1 \section{\class{wxSocketBase
}}\label{wxsocketbase
}
3 \wxheading{Derived from
}
5 \helpref{wxEvtHandler
}{wxevthandler
}
7 \wxheading{Include files
}
11 % ---------------------------------------------------------------------------
13 % ---------------------------------------------------------------------------
14 \wxheading{Event handling
}
16 To process events from a socket, use the following event handler macro to direct
18 functions that take a
\helpref{wxSocketEvent
}{wxsocketevent
} argument.
21 \begin{twocollist
}\itemsep=
0pt
22 \twocolitem{{\bf EVT
\_SOCKET(id, func)
}}{A socket event occured.
}
25 % ---------------------------------------------------------------------------
27 % ---------------------------------------------------------------------------
30 \helpref{wxSocketEvent
}{wxsocketevent
}\\
31 \helpref{wxSocketClient
}{wxsocketclient
}\\
32 \helpref{wxSocketServer
}{wxsocketserver
}
34 % ---------------------------------------------------------------------------
36 % ---------------------------------------------------------------------------
37 \latexignore{\rtfignore{\wxheading{Members
}}}
39 \membersection{wxSocketBase::wxSocketBase
}
41 \func{}{wxSocketBase
}{\void}
43 Default constructor but don't use it, you must use
\helpref{wxSocketClient
}{wxsocketclient
}
44 or
\helpref{wxSocketServer
}{wxsocketserver
}.
46 \membersection{wxSocketBase::
\destruct{wxSocketBase
}}
48 \func{}{\destruct{wxSocketBase
}}{\void}
50 Destroys the wxSocketBase object.
52 % ---------------------------------------------------------------------------
54 % ---------------------------------------------------------------------------
56 \membersection{wxSocketBase::Ok
}\label{wxsocketbaseok
}
58 \constfunc{bool
}{Ok
}{\void}
60 Returns TRUE if the socket is initialized and ready and FALSE in other
63 \membersection{wxSocketBase::Error
}\label{wxsocketbaseerror
}
65 \constfunc{bool
}{Error
}{\void}
67 Returns TRUE if an error occured.
69 \membersection{wxSocketBase::IsConnected
}\label{wxsocketbaseconnected
}
71 \constfunc{bool
}{IsConnected
}{\void}
73 Returns TRUE if the socket is connected.
75 \membersection{wxSocketBase::IsData
}\label{wxsocketbaseisdata
}
77 \constfunc{bool
}{IsData
}{\void}
79 Returns TRUE if some data is arrived on the socket.
81 \membersection{wxSocketBase::IsDisconnected
}\label{wxsocketbasedisconnected
}
83 \constfunc{bool
}{IsDisconnected
}{\void}
85 Returns TRUE if the socket is disconnected.
87 \membersection{wxSocketBase::IsNoWait
}\label{wxsocketbasenowait
}
89 \constfunc{bool
}{IsNoWait
}{\void}
91 Returns TRUE if the socket mustn't wait.
93 \membersection{wxSocketBase::LastCount
}\label{wxsocketbaselastcount
}
95 \constfunc{size
\_t}{LastCount
}{\void}
97 Returns the number of bytes read or written by the last IO call.
99 \membersection{wxSocketBase::LastError
}\label{wxsocketbaselasterror
}
101 \constfunc{int
}{LastError
}{\void}
103 Returns an error in the errno format (see your C programmer's guide).
105 % ---------------------------------------------------------------------------
107 % ---------------------------------------------------------------------------
111 \membersection{wxSocketBase::Peek
}\label{wxsocketbasepeek
}
113 \func{wxSocketBase\&
}{Peek
}{\param{char *
}{ buffer
},
\param{size
\_t}{ nbytes
}}
115 This function peeks a buffer of
{\it nbytes
} bytes from the socket. Peeking a buffer
116 doesn't delete it from the system socket in-queue.
118 \wxheading{Parameters
}
120 \docparam{buffer
}{Buffer where to put peeked data.
}
122 \docparam{nbytes
}{Number of bytes.
}
124 \wxheading{Return value
}
126 Returns a reference to the current object.
130 \helpref{wxSocketBase::Error
}{wxsocketbaseerror
}\\
131 \helpref{wxSocketBase::LastCount
}{wxsocketbaselastcount
}\\
132 \helpref{wxSocketBase::LastError
}{wxsocketbaselasterror
}
137 \membersection{wxSocketBase::Read
}\label{wxsocketbaseread
}
139 \func{wxSocketBase\&
}{Read
}{\param{char *
}{ buffer
},
\param{size
\_t}{ nbytes
}}
141 This function reads a buffer of
{\it nbytes
} bytes from the socket.
143 \wxheading{Parameters
}
145 \docparam{buffer
}{Buffer where to put read data.
}
147 \docparam{nbytes
}{Number of bytes.
}
149 \wxheading{Return value
}
151 Returns a reference to the current object.
153 \wxheading{Remark/Warning
}
155 By default, Read uses an internal asynchronous manager: it will send data when
156 the socket requests them. It is particularly interesting when you enter a long
157 data transfer (e.g. a big file, an image, ...). But it is also buggy when you
158 simply discuss with the peer using user data. In this case, wxSocket prepares
159 itself to send data (Write wait for them to be sent) and during a GUI refresh
160 the user enters new data, which involves a new Read call though the previous
161 isn't finished. Well, in most cases it can work but it might fail too.
162 So I advise you to use the SPEED flag, which disables the asynchronous manager,
163 when you just want to discuss with the peer.
165 This remark is also valid for all IO call.
169 \helpref{wxSocketBase::Error
}{wxsocketbaseerror
},
170 \helpref{wxSocketBase::LastCount
}{wxsocketbaselastcount
},
171 \helpref{wxSocketBase::LastError
}{wxsocketbaselasterror
}
173 \membersection{wxSocketBase::SetFlags
}\label{wxsocketbasesetflags
}
175 \func{void
}{SetFlags
}{\param{wxSockFlags
}{ flags
}}
178 \begin{twocollist
}\itemsep=
0pt
179 \twocolitem{{\bf wxSocketBase::NONE
}}{Normal functionnalities.
}
180 \twocolitem{{\bf wxSocketBase::NOWAIT
}}{Get the available data in the input queue and exit immediately.
}
181 \twocolitem{{\bf wxSocketBase::WAITALL
}}{Wait for all required data unless an error occured.
}
182 \twocolitem{{\bf wxSocketBase::SPEED
}}{Disable the asynchronous IO functionnality.
}
188 \membersection{wxSocketBase::Write
}\label{wxsocketbasewrite
}
190 \func{wxSocketBase\&
}{Write
}{\param{const char *
}{ buffer
},
\param{size
\_t}{ nbytes
}}
192 This function writes a buffer of
{\it nbytes
} bytes from the socket.
194 \wxheading{Remark/Warning
}
196 By default, Write uses an internal asynchronous manager: it will send data when
197 the socket requests them. It is particularly interesting when you enter a long
198 data transfer (e.g. a big file, an image, ...). But it is also buggy when you
199 simply discuss with the peer using user data. In this case, wxSocket prepares
200 itself to send data (Write wait for them to be sent) and during a GUI refresh
201 the user enters new data, which involves a new Write call though the previous
202 isn't finished. Well, in most cases it can work but it might fail too.
203 So I advise you to use the SPEED flag, which disables the asynchronous manager,
204 when you just want to discuss with the peer.
206 \wxheading{Parameters
}
208 \docparam{buffer
}{Buffer where to get the data to write.
}
210 \docparam{nbytes
}{Number of bytes.
}
212 \wxheading{Return value
}
214 Returns a reference to the current object.
218 \helpref{wxSocketBase::Error
}{wxsocketbaseerror
}\\
219 \helpref{wxSocketBase::LastCount
}{wxsocketbaselastcount
}\\
220 \helpref{wxSocketBase::LastError
}{wxsocketbaselasterror
}
225 \membersection{wxSocketBase::WriteMsg
}\label{wxsocketbasewritemsg
}
227 \func{wxSocketBase\&
}{WriteMsg
}{\param{const char *
}{ buffer
},
\param{size
\_t}{ nbytes
}}
229 This function writes a buffer of
{\it nbytes
} bytes from the socket. But it
230 writes a short header before so that ReadMsg can alloc the right size for
231 the buffer. So a buffer sent with WriteMsg
{\bf must
} be read with ReadMsg.
233 \wxheading{Parameters
}
235 \docparam{buffer
}{Buffer where to put data peeked.
}
237 \docparam{nbytes
}{Number of bytes.
}
239 \wxheading{Return value
}
241 Returns a reference to the current object.
245 \helpref{wxSocketBase::Error
}{wxsocketbaseerror
}\\
246 \helpref{wxSocketBase::LastCount
}{wxsocketbaselastcount
}\\
247 \helpref{wxSocketBase::LastError
}{wxsocketbaselasterror
}\\
248 \helpref{wxSocketBase::ReadMsg
}{wxsocketbasereadmsg
}
253 \membersection{wxSocketBase::ReadMsg
}\label{wxsocketbasereadmsg
}
255 \func{wxSocketBase\&
}{ReadMsg
}{\param{char *
}{ buffer
},
\param{size
\_t}{ nbytes
}}
257 This function reads a buffer sent by WriteMsg on a socket. If the buffer passed
258 to the function isn't big enough, the function filled it and then discard the
259 bytes left. This function always wait for the buffer to be entirely filled.
261 \wxheading{Parameters
}
263 \docparam{buffer
}{Buffer where to put read data.
}
265 \docparam{nbytes
}{Number of bytes allocated for the buffer.
}
267 \wxheading{Return value
}
269 Returns a reference to the current object.
273 \helpref{wxSocketBase::Error
}{wxsocketbaseerror
}\\
274 \helpref{wxSocketBase::LastCount
}{wxsocketbaselastcount
}\\
275 \helpref{wxSocketBase::LastError
}{wxsocketbaselasterror
}\\
276 \helpref{wxSocketBase::WriteMsg
}{wxsocketbasewritemsg
}
281 \membersection{wxSocketBase::UnRead
}\label{wxsocketbaseunread
}
283 \func{wxSocketBase\&
}{UnRead
}{\param{const char *
}{ buffer
},
\param{size
\_t}{ nbytes
}}
285 This function unreads a buffer. It means that the buffer is put in the top
286 of the incoming queue. But, it is put also at the end of all unread buffers.
287 It is useful for sockets because we can't seek it.
289 \wxheading{Parameters
}
291 \docparam{buffer
}{Buffer to be unread.
}
293 \docparam{nbytes
}{Number of bytes.
}
295 \wxheading{Return value
}
297 Returns a reference to the current object.
301 \helpref{wxSocketBase::Error
}{wxsocketbaseerror
}\\
302 \helpref{wxSocketBase::LastCount
}{wxsocketbaselastcount
}\\
303 \helpref{wxSocketBase::LastError
}{wxsocketbaselasterror
}
308 \membersection{wxSocketBase::Discard
}\label{wxsocketbasediscard
}
310 \func{wxSocketBase\&
}{Discard
}{\void}
312 This function simply deletes all bytes in the incoming queue. This function
315 % ---------------------------------------------------------------------------
317 % ---------------------------------------------------------------------------
318 \membersection{wxSocketBase::Wait
}\label{wxsocketbasewait
}
320 \func{bool
}{Wait
}{\param{long
}{ seconds = -
1},
\param{long
}{ microsecond =
0}}
322 This function waits for an event: it could be an incoming byte, the possibility
323 for the client to write, a lost connection, an incoming connection, an
324 established connection.
326 \wxheading{Parameters
}
328 \docparam{seconds
}{Number of seconds to wait. By default, it waits infinitely.
}
330 \docparam{microsecond
}{Number of microseconds to wait.
}
332 \wxheading{Return value
}
334 Returns TRUE if an event occured, FALSE if the timeout was reached.
338 \helpref{wxSocketBase::WaitForRead
}{wxsocketbasewaitforread
}\\
339 \helpref{wxSocketBase::WaitForWrite
}{wxsocketbasewaitforwrite
}\\
340 \helpref{wxSocketBase::WaitForLost
}{wxsocketbasewaitforlost
}
345 \membersection{wxSocketBase::WaitForRead
}\label{wxsocketbasewaitforread
}
347 \func{bool
}{WaitForRead
}{\param{long
}{ seconds = -
1},
\param{long
}{ microsecond =
0}}
349 This function waits for a read event.
351 \wxheading{Parameters
}
353 \docparam{seconds
}{Number of seconds to wait. By default, it waits infinitely.
}
355 \docparam{microsecond
}{Number of microseconds to wait.
}
357 \wxheading{Return value
}
359 Returns TRUE if a byte arrived, FALSE if the timeout was reached.
363 \helpref{wxSocketBase::Wait
}{wxsocketbasewait
}\\
364 \helpref{wxSocketBase::WaitForWrite
}{wxsocketbasewaitforwrite
}\\
365 \helpref{wxSocketBase::WaitForLost
}{wxsocketbasewaitforlost
}
370 \membersection{wxSocketBase::WaitForWrite
}\label{wxsocketbasewaitforwrite
}
372 \func{bool
}{WaitForWrite
}{\param{long
}{ seconds = -
1},
\param{long
}{ microsecond =
0}}
374 This function waits for a write event.
376 \wxheading{Parameters
}
378 \docparam{seconds
}{Number of seconds to wait. By default, it waits infinitely.
}
380 \docparam{microsecond
}{Number of microseconds to wait.
}
382 \wxheading{Return value
}
384 Returns TRUE if a write event occured, FALSE if the timeout was reached.
388 \helpref{wxSocketBase::Wait
}{wxsocketbasewait
}\\
389 \helpref{wxSocketBase::WaitForRead
}{wxsocketbasewaitforread
}\\
390 \helpref{wxSocketBase::WaitForLost
}{wxsocketbasewaitforlost
}
395 \membersection{wxSocketBase::WaitForLost
}\label{wxsocketbasewaitforlost
}
397 \func{bool
}{Wait
}{\param{long
}{ seconds = -
1},
\param{long
}{ microsecond =
0}}
399 This function waits for a "lost" event. For instance, the peer may have closed
400 the connection, or the connection may have been broken.
402 \wxheading{Parameters
}
404 \docparam{seconds
}{Number of seconds to wait. By default, it waits infinitely.
}
406 \docparam{microsecond
}{Number of microseconds to wait.
}
408 \wxheading{Return value
}
410 Returns TRUE if a "lost" event occured, FALSE if the timeout was reached.
414 \helpref{wxSocketBase::WaitForRead
}{wxsocketbasewaitforread
}\\
415 \helpref{wxSocketBase::WaitForWrite
}{wxsocketbasewaitforwrite
}\\
416 \helpref{wxSocketBase::WaitForLost
}{wxsocketbasewaitforlost
}
421 \membersection{wxSocketBase::RestoreState
}\label{wxsocketbaserestorestate
}
423 \func{void
}{RestoreState
}{\void}
425 This function restores a previously saved state.
429 \helpref{wxSocketBase::SaveState
}{wxsocketbasesavestate
}
431 % ---------------------------------------------------------------------------
433 % ---------------------------------------------------------------------------
437 \membersection{wxSocketBase::SaveState
}\label{wxsocketbasesavestate
}
439 \func{void
}{SaveState
}{\void}
441 This function saves the current state of the socket object in a stack:
442 actually it saves all flags and the state of the asynchronous callbacks.
446 \helpref{wxSocketBase::RestoreState
}{wxsocketbaserestorestate
}
448 % ---------------------------------------------------------------------------
450 % ---------------------------------------------------------------------------
451 \membersection{wxSocketBase::SetEventHandler
}\label{wxsocketbaseseteventhandler
}
453 \func{void
}{SetEventHandler
}{\param{wxEvtHandler\&
}{ evt
\_hdlr},
\param{int
}{ id = -
1}}
455 Sets an event handler to be called when a socket event occured.
457 \wxheading{Parameters
}
459 \docparam{evt
\_hdlr}{Specifies the event handler you want to use.
}
461 \docparam{id
}{The id of socket event.
}
465 \helpref{wxSocketEvent
}{wxsocketevent
}
467 % ---------------------------------------------------------------------------
468 % CLASS wxSocketClient
469 % ---------------------------------------------------------------------------
470 \section{\class{wxSocketClient
}}\label{wxsocketclient
}
472 \wxheading{Derived from
}
474 \helpref{wxSocketBase
}{wxsocketbase
}
476 \wxheading{Include files
}
480 % ---------------------------------------------------------------------------
482 % ---------------------------------------------------------------------------
486 \membersection{wxSocketClient::wxSocketClient
}
488 \func{}{wxSocketClient
}{\param{wxSockFlags
}{ flags = wxSocketBase::NONE
}}
490 Constructs a new wxSocketClient.
492 {\bf Warning !
} The new socket client needs to be registered to a socket handler (See
\helpref{wxSocketHandler
}{wxsockethandler
}).
494 \wxheading{Parameters
}
496 \docparam{flags
}{Socket flags (See
\helpref{wxSocketBase::SetFlags
}{wxsocketbasesetflags
})
}
501 \membersection{wxSocketClient::
\destruct{wxSocketClient
}}
503 \func{}{\destruct{wxSocketClient
}}{\void}
505 Destroys a wxSocketClient object.
510 \membersection{wxSocketClient::Connect
}\label{wxsocketclientconnect
}
512 \func{bool
}{Connect
}{\param{wxSockAddress\&
}{ address
},
\param{bool
}{ wait = TRUE
}}
514 Connects to a server using the specified address. If
{\it wait
} is TRUE, Connect
515 will wait for the socket ready to send or receive data.
517 \wxheading{Parameters
}
519 \docparam{address
}{Address of the server.
}
521 \docparam{wait
}{If true, waits for the connection to be ready.
}
523 \wxheading{Return value
}
525 Returns TRUE if the connection is established and no error occurs.
529 \helpref{wxSocketClient::WaitOnConnect
}{wxsocketclientwaitonconnect
}
534 \membersection{wxSocketClient::WaitOnConnect
}\label{wxsocketclientwaitonconnect
}
536 \func{bool
}{WaitOnConnect
}{\param{long
}{ seconds = -
1},
\param{long
}{ microseconds =
0}}
538 Wait for a "connect" event.
542 \helpref{wxSocketBase::Wait
}{wxsocketbasewait
} for a detailed description.
544 % ---------------------------------------------------------------------------
545 % CLASS: wxSocketEvent
546 % ---------------------------------------------------------------------------
547 \section{\class{wxSocketEvent
}}\label{wxsocketevent
}
549 This event class contains information about socket events.
551 \wxheading{Derived from
}
553 \helpref{wxEvent
}{wxevent
}
555 \wxheading{Include files
}
559 \wxheading{Event table macros
}
561 To process a socket event, use these event handler macros to direct input to member
562 functions that take a wxSocketEvent argument.
565 \begin{twocollist
}\itemsep=
0pt
566 \twocolitem{{\bf EVT
\_SOCKET(id, func)
}}{Process a socket event, supplying the member function.
}
571 \helpref{wxSocketHandler
}{wxsockethandler
},
\rtfsp
572 \helpref{wxSocketBase
}{wxsocketbase
},
\rtfsp
573 \helpref{wxSocketClient
}{wxsocketclient
},
\rtfsp
574 \helpref{wxSocketServer
}{wxsocketserver
}
576 \latexignore{\rtfignore{\wxheading{Members
}}}
578 \membersection{wxSocketEvent::wxSocketEvent
}
580 \func{}{wxSocketEvent
}{\param{int
}{ id =
0}}
584 \membersection{wxSocketEvent::SocketEvent
}\label{wxsocketeventsocketevent
}
586 \constfunc{wxSocketBase::wxRequestEvent
}{SocketEvent
}{\void}
588 Returns the socket event type.
590 % ---------------------------------------------------------------------------
591 % CLASS: wxSocketHandler
592 % ---------------------------------------------------------------------------
593 \section{\class{wxSocketHandler
}}\label{wxsockethandler
}
595 \wxheading{Derived from
}
597 \helpref{wxObject
}{wxobject
}
599 \wxheading{Include files
}
603 % ---------------------------------------------------------------------------
605 % ---------------------------------------------------------------------------
606 \latexignore{\rtfignore{\wxheading{Members
}}}
611 \membersection{wxSocketHandler::wxSocketHandler
}
613 \func{}{wxSocketHandler
}{\void}
615 Constructs a new wxSocketHandler.
617 It is advised to use
\helpref{wxSocketHandler::Master
}{wxsockethandlermaster
} to
618 get a socket handler. But creating a socket handler is useful to group
624 \membersection{wxSocketHandler::
\destruct{wxSocketHandler
}}
626 \func{}{\destruct{wxSocketHandler
}}{\void}
628 Destroys a wxSocketHandler object.
633 \membersection{wxSocketHandler::Register
}
635 \func{void
}{Register
}{\param{wxSocketBase *
}{socket
}}
637 Register a socket: if it is already registered in this handler it will just
640 \wxheading{Parameters
}
642 \docparam{socket
}{Socket to be registered.
}
647 \membersection{wxSocketHandler::UnRegister
}
649 \func{void
}{UnRegister
}{\param{wxSocketBase *
}{socket
}}
651 UnRegister a socket: if it isn't registered in this handler it will just
654 \wxheading{Parameters
}
656 \docparam{socket
}{Socket to be unregistered.
}
661 \membersection{wxSocketHandler::Count
}
663 \constfunc{unsigned long
}{Count
}{\void}
665 Returns the number of sockets registered in the handler.
667 \wxheading{Return value
}
669 Number of sockets registered.
674 \membersection{wxSocketHandler::CreateServer
}
676 \func{wxSocketServer *
}{CreateServer
}{\param{wxSockAddress\&
}{ address
},
\param{wxSocketBase::wxSockFlags
}{ flags = wxSocketbase::NONE
}}
678 Creates a new wxSocketServer object. The object is automatically registered
679 to the current socket handler.
680 For a detailed description of the parameters, see
\helpref{wxSocketServer::wxSocketServer
}{wxsocketserverconstr
}.
682 \wxheading{Return value
}
684 Returns a new socket server.
689 \membersection{wxSocketHandler::CreateClient
}
691 \func{wxSocketServer *
}{CreateClient
}{\param{wxSocketBase::wxSockFlags
}{ flags = wxSocketbase::NONE
}}
693 Creates a new wxSocketClient object. The object is automatically registered
694 to the current socket handler.
696 For a detailed description of the parameters, see
\helpref{wxSocketClient::Connect
}{wxsocketclientconnect
}.
698 \wxheading{Return value
}
700 Returns a new socket client.
705 \membersection{wxSocketHandler::Master
}\label{wxsockethandlermaster
}
707 \func{static wxSocketHandler\&
}{Master
}{\void}
709 Returns a default socket handler.
714 \membersection{wxSocketHandler::Wait
}
716 \func{int
}{Wait
}{\param{long
}{ seconds
},
\param{long
}{ microseconds
}}
718 Wait for an event on all registered sockets.
720 \wxheading{Parameters
}
722 \docparam{seconds
}{Number of seconds to wait. By default, it waits infinitely.
}
724 \docparam{microsecond
}{Number of microseconds to wait.
}
726 \wxheading{Return value
}
728 Returns
0 if a timeout occured, else the number of events detected.
732 \helpref{wxSocketBase::Wait
}{wxsocketbasewait
}
737 \membersection{wxSocketHandler::YieldSock
}
739 \func{void
}{YieldSock
}{\void}
741 Execute pending requests in all registered sockets.
743 % ---------------------------------------------------------------------------
744 % CLASS: wxSocketServer
745 % ---------------------------------------------------------------------------
746 \section{\class{wxSocketServer
}}\label{wxsocketserver
}
748 \wxheading{Derived from
}
750 \helpref{wxSocketBase
}{wxsocketbase
}
752 \wxheading{Include files
}
756 % ---------------------------------------------------------------------------
758 % ---------------------------------------------------------------------------
759 \latexignore{\rtfignore{\wxheading{Members
}}}
764 \membersection{wxSocketServer::wxSocketServer
}\label{wxsocketserverconstr
}
766 \func{}{wxSocketServer
}{\param{wxSockAddress\&
}{ address
},
\param{wxSockFlags
}{ flags = wxSocketBase::NONE
}}
768 Constructs a new wxSocketServer.
770 {\bf Warning !
} The created object needs to be registered to a socket handler
771 (see
\helpref{wxSocketHandler
}{wxsockethandler
}).
773 \wxheading{Parameters
}
775 \docparam{address
}{Specifies the local address for the server (e.g. port number).
}
777 \docparam{flags
}{Socket flags (See
\helpref{wxSocketBase::SetFlags
}{wxsocketbasesetflags
})
}
782 \membersection{wxSocketServer::
\destruct{wxSocketServer
}}
784 \func{}{\destruct{wxSocketServer
}}{\void}
786 Destroys a wxSocketServer object (it doesn't close the accepted connection).
791 \membersection{wxSocketServer::Accept
}
793 \func{wxSocketBase *
}{Accept
}{\void}
795 Creates a new object wxSocketBase and accepts an incoming connection.
{\bf Warning !
} This function will block the GUI.
797 \wxheading{Return value
}
799 Returns an opened socket connection.
803 \helpref{wxSocketServer::AcceptWith
}{wxsocketserveracceptwith
}
808 \membersection{wxSocketServer::AcceptWith
}\label{wxsocketserveracceptwith
}
810 \func{bool
}{AcceptWith
}{\param{wxSocketBase\&
}{ socket
}}
812 Accept an incoming connection using the specified socket object.
813 This is useful when someone wants to inherit wxSocketBase.
815 \wxheading{Parameters
}
817 \docparam{socket
}{Socket to be initialized
}
819 \wxheading{Return value
}
821 Returns TRUE if no error occurs, else FALSE.