back to io 

wxSocketServer

generated from ../src/mod_io/socksrv.cpp

This class implements server sockets. A server socket waits for requests to come in over the network.

Constants

Constructor

wxSocketServer

wxSocketServer(Address, 
               Flag = wxSocketFlags.NONE)
 
Name Type Default Description
Address wxSockAddress
Flag wxSocketFlags wxSocketFlags.NONE

Constructs a new wxSocketServer.

Methods

accept

accept(Wait = true) : wxSocketBase
 
Name Type Default Description
Wait Boolean true If wait is true and there are no pending connections to be accepted, it will wait for the next incoming connection to arrive.

Accepts an incoming connection request, and creates a new wxSocketBase object which represents the server-side of the connection. Returns an opened socket connection, or NULL if an error occurred or if the wait parameter was false and there were no pending connections.

acceptWith

acceptWith(Socket, 
           Wait = true) : Boolean
 
Name Type Default Description
Socket wxSocketBase
Wait Boolean true If wait is true and there are no pending connections to be accepted, it will wait for the next incoming connection to arrive.

Accept an incoming connection using the specified socket object.

waitForAccept

waitForAccept(Seconds = -1, 
              MilliSeconds = 0) : Boolean
 
Name Type Default Description
Seconds Integer -1
MilliSeconds Integer 0

This function waits for an incoming connection. Use it if you want to call accept or acceptWith with wait set to false, to detect when an incoming connection is waiting to be accepted. Returns true if an incoming connection arrived, false if the timeout elapsed.



SourceForge.net Logo Support This Project

Table of Contents

Prototype

wxSocketBase

Constructor

wxSocketServer

Methods

accept
acceptWith
waitForAccept


Design downloaded from Zeroweb.org: Free website templates, layouts, and tools.