Networking

Networking
Doing things across networks

Functions/Procedures
Subtopics

Networking

[func]
get_socket_event
( atom event )

Category: Networking

Returns the socket event type.


Networking

[func]
is_connected
( atom socket )

Category: Networking

Returns a 0 if the socket is not connected, 1 if it is.


Networking

[proc]
set_flags
( atom socket, atom flags )

Category: Networking

Sets a sequence of flags to a specified socket. You must assign a socket flags after every procedure/function loop or it will not look for them and you could lose soemthing.

Events that can be chosen are

Alternatively, you can do set_flags ( Socket, {0} ) which will make the socket stop waiting for events. However, the connection will still remain.

Networking

[proc]
set_socket_notify
( atom socket, object notify )

Category: Networking

Works for both wxSocketServer and wxSocketClient. Specifies which socket events are to be sent to the event handler. The flags parameter may be combination of flags ORed together. The following flags can be used:


Networking

[proc]
socket_event_handler
( atom socket, atom evt_handler, atom id )

Category: Networking

When calling set_event_handler() for a wxEVT_SOCKET event, for the 'this' parameter, you must pass a sequence consisting of the object to handle the events and the socket.

Example:

   socket_event_handler( socket, form, socket_id )
   set_event_handler( {form, socket}, -1, wxEVT_SOCKET, routine_id("socket_event"))

Networking

[func]
socket_from_event
( atom event )

Category: Networking

Returns the pointer to the socket that sent the wxSocketEvent.


Networking

[proc]
socket_read
( atom socket )

Category: Networking

Works for wxSocketServer, wxSocketClient, wxHTTP and wxFTP.


Networking

[proc]
socket_write
( atom socket, sequence bytes )

Category: Networking

Works for both wxSocketServer and wxSocketClient.