MLton 20051202 MLtonSocket
Home  Index  
signature MLTON_SOCKET =
   sig
      structure Address:
         sig
            type t = word
         end
      structure Ctl:
         sig
            val getERROR: ('a, 'b) Socket.sock -> (string * int 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 fdToSock: Posix.FileSys.file_desc -> ('a, 'b) Socket.sock
      val listen: unit -> Port.t * t
      val listenAt: Port.t -> t
      val shutdownRead: TextIO.instream -> unit
      val shutdownWrite: TextIO.outstream -> unit
   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 Standard Basis Library. We encourage you to use the standard Socket module, since we may eliminate MLton.Socket some day.


Last edited on 2005-12-01 23:07:28 by StephenWeeks.