back to io 

wxSocketClient

generated from ../src/mod_io/sockclient.cpp

This class implements client sockets.

Constants

Constructor

wxSocketClient

wxSocketClient(Flag = wxSocketFlags.NONE)
 
Name Type Default Description
Flag wxSocketFlags wxSocketFlags.NONE

Constructs a new wxSocketClient.

Methods

connect

connect(Address, 
        Wait = true) : Boolean
 
Name Type Default Description
Address wxSockAddress Address of the server
Wait Boolean true Wait for the connection to complete?

Connects to a server using the specified address. Returns true if the connection is established and no error occurs. If Wait is false, connect will try to establish the connection and return immediately, without blocking the GUI. When used this way, even if connect returns false, the connection request can be completed later. To detect this, use waitOnConnect, or catch socket events.

waitOnConnect

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

Wait until a connection request completes, or until the specified timeout elapses. Use this function after issuing a call to Connect with wait set to false. waitOnConnect returns true if the connection request completes. This does not necessarily mean that the connection was successfully established; it might also happen that the connection was refused by the peer. Use connected to distinguish between these two situations.



SourceForge.net Logo Support This Project

Table of Contents

Prototype

wxSocketBase

Constructor

wxSocketClient

Methods

connect
waitOnConnect


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