Skip to content

Instantly share code, notes, and snippets.

@duckinator
Created November 3, 2010 23:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save duckinator/661903 to your computer and use it in GitHub Desktop.
Save duckinator/661903 to your computer and use it in GitHub Desktop.
Functions implemented in ooc's new ServerSocket API as of 19:40 EST on November 3rd 2010
SOCKET INITIALIZATION:
ServerSocket new() // Create socket, no binding, not listening
ServerSocket new(port: Int) // Create socket, bind to port, not listening
ServerSocket new(ip: String, port: Int) // Create socket, bind to IP and port, not listening
ServerSocket new(ip: String, port: Int, enabled: Bool) // Create socket, bind to IP and port, listening only if `enabled` is true
ServerSocket bind(port: Int) // Bind to port
ServerSocket bind(ip: String, port: Int) // Bind to IP and port
ServerSocket listen(backlog: Int) // Listen, with backlog specified as argument
ServerSocket listen() // Calls listen(100), more details in sdk/net/ServerSocket.ooc line #138
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment