Network Functions.
[API Functions]

Facilitates sending and receiving of network data and manipulating network lines being processed. More...

Functions

F2LINK Connection_Level F2CALL f2_connlvl ()
 Retrieve the current game connection level.
F2LINK void F2CALL f2_netout (const char *buf, std::size_t size)
 Sends some bytes to the server.
F2LINK size_t F2CALL f2_netoutline (const char *line, std::size_t len)
 Sends a line to the server.
F2LINK size_t F2CALL f2_netoutcount ()
 Returns the next outbound line number to be assigned.
F2LINK void F2CALL f2_netin (const char *buf, std::size_t size)
 Sends some bytes to the client.
F2LINK size_t F2CALL f2_netinline (const char *line, std::size_t len)
 Sends a line to the client.
F2LINK size_t F2CALL f2_netincount ()
 Returns the next inbound line number to be assigned.
F2LINK void F2CALL f2_reviseline (const char *line)
 Modifies the current line being revised.
F2LINK void F2CALL f2_cancelline ()
 Cancels the current line.
F2LINK void F2CALL f2_hideline (int hide_flags)
 Prevents the current line from being processed by further handlers/listeners in specific subsystems.
F2LINK int F2CALL f2_hideflags ()
 Retrieves the hide flags for the current line.

Detailed Description

Facilitates sending and receiving of network data and manipulating network lines being processed.


Function Documentation

F2LINK void F2CALL furn2::f2_cancelline (  ) 

Cancels the current line.

Deprecated:
This function is only included for legacy modules and has been replaced by the more robust f2_hideline(). In fact, this function is essentially synonymous with f2_hideline( HIDE_ALL ).
See also:
on_inet on_onet f2_reviseline() f2_hideline()

F2LINK Connection_Level F2CALL furn2::f2_connlvl (  ) 

Retrieve the current game connection level.

Returns:
The connection level.
Remarks:
This refers to the primary, game connection.

F2LINK int F2CALL furn2::f2_hideflags (  ) 

Retrieves the hide flags for the current line.

Returns:
The hide flags for the current line.
See also:
Hide_Flags f2_hideline()

F2LINK void F2CALL furn2::f2_hideline ( int  hide_flags  ) 

Prevents the current line from being processed by further handlers/listeners in specific subsystems.

Parameters:
[in] hide_flags A combination of the flags defined in the Hide_Flags enum below. In contrast to f2_cancelline(), this function does not modify the line, and allows you to control (by combining flags) which subsystems along the chain will not receive the current line. Like f2_cancelline(), this function may be called during any pass of on_inet or on_onet. To mimic f2_cancelline() behavior, simply use the HIDE_ALL flag.
Remarks:
Currently, modules cannot hide a line from filters or (non-late) scripts, as the module subsystem is further down the chain. The full chain in which subsystems receive inbound and outbound lines is:
  • Filters
  • Scripts
  • Modules
  • Scripts (ran with --late option)
  • World
  • Client
See also:
Hide_Flags on_inet on_onet f2_reviseline()

F2LINK void F2CALL furn2::f2_netin ( const char *  buf,
std::size_t  size 
)

Sends some bytes to the client.

Parameters:
[in] buf Bytes to send.
[in] size Number of bytes to send.
Remarks:
Bytes are queued, not sent or processed immediately.
See also:
on_inet f2_netinline() f2_netincount()

F2LINK size_t F2CALL furn2::f2_netincount (  ) 

Returns the next inbound line number to be assigned.

Returns:
The next inbound line number.
See also:
on_onet f2_netin() f2_netinline()

F2LINK size_t F2CALL furn2::f2_netinline ( const char *  line,
std::size_t  len 
)

Sends a line to the client.

Parameters:
[in] line Line to send.
[in] len Length of the line.
Returns:
The line number.
Remarks:
Lines are queued, not sent or processed immediately. The return value can be used to identify the line as it passes through on_onet.
See also:
on_onet f2_netin() f2_netincount()

F2LINK void F2CALL furn2::f2_netout ( const char *  buf,
std::size_t  size 
)

Sends some bytes to the server.

Parameters:
[in] buf Bytes to send.
[in] size Number of bytes to send.
Remarks:
Bytes are queued, not sent or processed immediately.
See also:
on_onet f2_netoutline() f2_netoutcount()

F2LINK size_t F2CALL furn2::f2_netoutcount (  ) 

Returns the next outbound line number to be assigned.

Returns:
The next outbound line number.
See also:
on_onet f2_netout() f2_netoutline()

F2LINK size_t F2CALL furn2::f2_netoutline ( const char *  line,
std::size_t  len 
)

Sends a line to the server.

Parameters:
[in] line Line to send.
[in] len Length of the line.
Returns:
The line number.
Remarks:
Lines are queued, not sent or processed immediately. The return value can be used to identify the line as it passes through on_onet.
See also:
on_onet f2_netout() f2_netoutcount()

F2LINK void F2CALL furn2::f2_reviseline ( const char *  line  ) 

Modifies the current line being revised.

Parameters:
[in] line A null-terminated line to replace the current line.
Remarks:
The current line can be modified in-place during the REV_REVISING pass of the on_inet() or on_onet() event.
Warning:
Once you revise or cancel a line, the data pointed to by the line string passed into the handler is in an undefined state. The address it points to may not even be valid anymore.
See also:
on_inet on_onet f2_cancelline()


Generated on Tue Jun 24 12:24:07 2008 for Furnarchy Module by  doxygen 1.5.5