MLton 20100608 MLtonSocket
Home  Index  
signature MLTON_SOCKET =
   sig
      structure Address:
         sig
            type t = NetHostDB.in_addr
         end
      structure Ctl:
         sig
            val getERROR: ('af, 'sock_type) Socket.sock -> (string * Posix.Error.syserror option) option
         end
      structure Host:
         sig
            type t = {name: string}

            val getByAddress: Address.t -> t option
            val getByName: string -> t option
         end
      structure Port:
         sig
            type t = int
         end

      type t

      val accept: t -> Address.t * Port.t * TextIO.instream * TextIO.outstream
      val connect: string * Port.t -> TextIO.instream * TextIO.outstream
      val listen: unit -> Port.t * t
      val listenAt: Port.t -> t
      val shutdownRead: TextIO.instream -> unit
      val shutdownWrite: TextIO.outstream -> unit

      val fdToSock: Posix.FileSys.file_desc -> ('a, 'b) Socket.sock
   end

This module contains a bare minimum of functionality to do TCP/IP programming. This module is implemented on top of the Socket module of the Basis Library. We encourage you to use the standard Socket module, since MLton.Socket is deprecated.


Last edited on 2007-08-23 03:45:24 by MatthewFluet.