Client Library - Socket API


Detailed Description

s_socket_* api is very internal, and is used for server / client interaction.

every message type has its own function both for sending and receiving. programmers do not need to use these functions unless they do not want to modify or expand the inter messaging sub system. additionaly, the comminication initializations is alsa done by this api calls.


Enumerations

enum  S_SOC_DATA {
  SOC_DATA_NOTHING = 0x0, SOC_DATA_NEW = 0x1, SOC_DATA_SHOW = 0x2, SOC_DATA_CLOSE = 0x3,
  SOC_DATA_EVENT = 0x4, SOC_DATA_EXPOSE = 0x5, SOC_DATA_DISPLAY = 0x6, SOC_DATA_FORMDRAW = 0x7,
  SOC_DATA_CONFIGURE = 0x8, SOC_DATA_DESKTOP = 0x9
}
 socket data types More...

Functions

int s_socket_request_new (s_window_t *window, int soc)
 send new window request to server
int s_socket_request_display (s_window_t *window, int soc)
 send display request to server
int s_socket_request_configure (s_window_t *window, int soc, int form)
 configure request to server
int s_socket_request_stream (s_window_t *window, int soc, s_rect_t *coor)
 stream request to server
int s_socket_request_show (s_window_t *window, int soc, int id, int show)
 show request to server
int s_socket_request_event (s_window_t *window, int soc, s_event_t *event)
 send event request to server
int s_socket_request (s_window_t *window, S_SOC_DATA req,...)
 send request to server
int s_socket_listen_event (s_window_t *window, int soc)
 recv, parse end process event data
int s_socket_listen_expose (s_window_t *window, int soc)
 recv, parse end process expose data
int s_socket_listen_desktop (s_window_t *window, int soc)
 recv, parse end process desktop data
int s_socket_listen_parse (s_window_t *window, int soc)
 recv, and call the processing function
int s_socket_listen_wait (s_window_t *window, int timeout)
 waits until any event occurs on socket, or timeout.
int s_socket_uninit (s_window_t *window, s_pollfd_t *pfd)
 uninitialize window socket
int s_socket_in_f (s_window_t *window, s_pollfd_t *pfd)
 pollfd in data call back function for window socket
int s_socket_ierr_f (s_window_t *window, s_pollfd_t *pfd)
 pollfd error call back function for window socket
int s_socket_inw_f (s_window_t *window, s_pollfd_t *pfd)
 pollfd in data call back function for window wakeup socket
int s_socket_ierrw_f (s_window_t *window, s_pollfd_t *pfd)
 pollfd error call back function for window wakeup socket
int s_socket_closew_f (s_window_t *window, s_pollfd_t *pfd)
 pollfd close call back function for window wakeup socket
int s_socket_init_uds (s_window_t *window)
 initialize uds socket connection between server and window
int s_socket_init_tcp (s_window_t *window)
 initialize tcp socket connection between server and window
int s_socket_init_wakeup (s_window_t *window)
 initialize wakeup socket for window
int s_socket_init (s_window_t *window)
 initialize socket connection between server and window


Enumeration Type Documentation

enum S_SOC_DATA

socket data types

Enumerator:
SOC_DATA_NOTHING  nothing ;)
SOC_DATA_NEW  new window
SOC_DATA_SHOW  show, hide
SOC_DATA_CLOSE  close me request
SOC_DATA_EVENT  event
SOC_DATA_EXPOSE  expose
SOC_DATA_DISPLAY  display properties
SOC_DATA_FORMDRAW  request to re draw window form
SOC_DATA_CONFIGURE  configure
SOC_DATA_DESKTOP  special data for desktop windows'


Function Documentation

int s_socket_closew_f ( s_window_t window,
s_pollfd_t pfd 
)

pollfd close call back function for window wakeup socket

Parameters:
*window - the window
*pfd - pollfd handler for window socket
Returns:
0 on success

int s_socket_ierr_f ( s_window_t window,
s_pollfd_t pfd 
)

pollfd error call back function for window socket

Parameters:
*window - the window
*pfd - pollfd handler for window socket
Returns:
0 on success

int s_socket_ierrw_f ( s_window_t window,
s_pollfd_t pfd 
)

pollfd error call back function for window wakeup socket

Parameters:
*window - the window
*pfd - pollfd handler for window socket
Returns:
0 on success

int s_socket_in_f ( s_window_t window,
s_pollfd_t pfd 
)

pollfd in data call back function for window socket

Parameters:
*window - the window
*pfd - pollfd handler for window socket
Returns:
0 on success

int s_socket_init ( s_window_t window  ) 

initialize socket connection between server and window

Parameters:
*window - the window
Returns:
0 on success

int s_socket_init_tcp ( s_window_t window  ) 

initialize tcp socket connection between server and window

Parameters:
*window - the window
Returns:
0 on success

int s_socket_init_uds ( s_window_t window  ) 

initialize uds socket connection between server and window

Parameters:
*window - the window
Returns:
0 on success

int s_socket_init_wakeup ( s_window_t window  ) 

initialize wakeup socket for window

Parameters:
*window - the window
Returns:
0 on success

int s_socket_inw_f ( s_window_t window,
s_pollfd_t pfd 
)

pollfd in data call back function for window wakeup socket

Parameters:
*window - the window
*pfd - pollfd handler for window socket
Returns:
0 on success

int s_socket_listen_desktop ( s_window_t window,
int  soc 
)

recv, parse end process desktop data

Parameters:
*window - the window
soc - window socket
Returns:
0 on success

int s_socket_listen_event ( s_window_t window,
int  soc 
)

recv, parse end process event data

Parameters:
*window - the window
soc - window socket
Returns:
0 on success

int s_socket_listen_expose ( s_window_t window,
int  soc 
)

recv, parse end process expose data

Parameters:
*window - the window
soc - window socket
Returns:
0 on success

int s_socket_listen_parse ( s_window_t window,
int  soc 
)

recv, and call the processing function

Parameters:
*window - the window
soc - window socket
Returns:
0 on success

int s_socket_listen_wait ( s_window_t window,
int  timeout 
)

waits until any event occurs on socket, or timeout.

Parameters:
*window - the window
timeout - timeout value in mili seconds
Returns:
0 on success

int s_socket_request ( s_window_t window,
S_SOC_DATA  req,
  ... 
)

send request to server

Parameters:
*window - the window
req - reuest type, followed with request params -if any-.
Returns:
0 on success

int s_socket_request_configure ( s_window_t window,
int  soc,
int  form 
)

configure request to server

Parameters:
*window - the window
soc - window socket
form - is form area will be calculated
Returns:
0 on success

int s_socket_request_display ( s_window_t window,
int  soc 
)

send display request to server

Parameters:
*window - the window
soc - window socket
Returns:
0 on success

int s_socket_request_event ( s_window_t window,
int  soc,
s_event_t event 
)

send event request to server

Parameters:
*window - the window
soc - window socket
*event - event data to send
Returns:
0 on success

int s_socket_request_new ( s_window_t window,
int  soc 
)

send new window request to server

Parameters:
*window - the window
soc - window socket
Returns:
0 on success

int s_socket_request_show ( s_window_t window,
int  soc,
int  id,
int  show 
)

show request to server

Parameters:
*window - the window
soc - window socket
id - requested window id
show - 1: show, 0: hide
Returns:
0 on success

int s_socket_request_stream ( s_window_t window,
int  soc,
s_rect_t coor 
)

stream request to server

Parameters:
*window - the window
soc - window socket
coor - coordinates to be updated
Returns:
0 on success

int s_socket_uninit ( s_window_t window,
s_pollfd_t pfd 
)

uninitialize window socket

Parameters:
*window - the window
*pfd - pollfd handler for window socket
Returns:
0 on success


Generated on Wed Dec 27 17:53:06 2006 for xynth-0.8.40 by  doxygen 1.4.7