Netcode Functions

  • Connect() Attempts to connect to the specified server host.
  • GetConnection() Listens for new connections
  • GetUrlImage() Connects to a URL and returns an image.
  • GetUrlText() Return text from a specified URL
  • SocketClose() Terminates a socket connection.
  • SocketConnected() Verifies sockets for connection.
  • SocketGetFile() Gets a file from the specified socket.
  • SocketGetInt() Gets an integer from the specified socket.
  • SocketGetString() Gets a string from the specified socket.
  • SocketHasData() Checks for data in the specified socket.
  • SocketSendFile() Sends a file to the specified socket.
  • SocketSendInt() Sends an integer to the specified socket.
  • SocketSendString() Sends a string to the specified socket.
  • Talkback

    Post a new comment?

    Talkback #1 written by Jesse on 2005-07-26.

    The basic outline of a netcode transaction goes like this. (Between 2 copies of verge, one on the client, one on the server.) In the server: int socket = GetConnection(); In the client: int socket = Connect(server_ip); You can then check with SocketConnected(socket) to see if that was successful (on both ends.) Here, either of them can SocketSend* or SocketGet* to send data back and forth. They can also check to see if there is data with SocketHasData(socket). Then they both call SocketClose(socket), and you're done. Please post further questions to the forums.

    Post a new comment?

    Ben McGraw's lovingly crafted this website from scratch for years.
    It's a lot prettier this go around because of Jon Wofford.
    Verge-rpg.com is a member of the lunarnet irc network, and would like to take this opportunity to remind you that regardless how babies taste, it is wrong to eat them.