Top | ![]() |
![]() |
![]() |
![]() |
SwfdecSockets are used to implement TCP streams. These are for example used to implement RTMP support or the XMLSocket script class. Backends are supposed to provide an implementation for this, as by default this class is unimplemented. However, swfdec-gtk or other convenience libraries provide a socket implementation by default.
The socket implementation used by a SwfdecPlayer can be set with the SwfdecPlayer:socket-type property.
struct SwfdecSocket;
This is the base object used for providing input. It is abstract, create a subclass to provide your own socket implementation. All members are considered private.
struct SwfdecSocketClass { void (* connect) (SwfdecSocket * socket, SwfdecPlayer * player, const char * hostname, guint port); void (* send) (SwfdecSocket * socket, SwfdecBuffer * buffer); };
This is the socket class. When you create a subclass, you need to implement the functions listed above.
Connect the given newly created socket to the given hostname and
port. If you encounter an error, call |
||
Called to send data down the given socket. This function will only be
called when the socket is open. You get passed a reference to the
buffer, so it is your responsibility to call |