Evd.Transport

g Evd.Transport Evd.Transport GObject.GInterface GObject.GInterface GObject.GInterface->Evd.Transport

Implementations:

Evd.LongpollingServer, Evd.WebTransportServer, Evd.WebsocketClient, Evd.WebsocketServer

Methods

accept_peer (peer)

close_peer (peer, gracefully)

create_new_peer ()

get_peer_manager ()

lookup_peer (peer_id)

open (address, cancellable, callback, *user_data)

open_finish (result)

peer_is_connected (peer)

receive (peer)

receive_text (peer)

reject_peer (peer)

send (peer, buffer, size)

send_text (peer, text)

set_peer_manager (peer_manager)

Virtual Methods

do_accept_peer (peer)

do_create_new_peer ()

do_notify_new_peer (peer)

do_notify_peer_closed (peer, gracefully)

do_notify_receive (peer)

do_notify_validate_peer (peer)

do_open (address, async_result, cancellable)

do_peer_closed (peer, gracefully)

do_peer_is_connected (peer)

do_receive (peer, buffer, size)

do_reject_peer (peer)

do_send (peer, buffer, size, type)

do_signal_new_peer (peer, *user_data)

do_signal_peer_closed (peer, gracefully, *user_data)

do_signal_receive (peer, *user_data)

do_signal_validate_peer (peer, *user_data)

Properties

None

Signals

Name

Short Description

new-peer

peer-closed

receive

validate-peer

Fields

None

Class Details

class Evd.Transport
Bases:

GObject.GInterface

Structure:

Evd.TransportInterface

accept_peer(peer)
Parameters:

peer (Evd.Peer) –

Return type:

bool

close_peer(peer, gracefully)
Parameters:
Raises:

GLib.Error

create_new_peer()
Return type:

Evd.Peer

get_peer_manager()
Return type:

Evd.PeerManager

lookup_peer(peer_id)
Parameters:

peer_id (str) –

Return type:

Evd.Peer

open(address, cancellable, callback, *user_data)
Parameters:
open_finish(result)
Parameters:

result (Gio.AsyncResult) –

Raises:

GLib.Error

Return type:

bool

peer_is_connected(peer)
Parameters:

peer (Evd.Peer) –

Return type:

bool

receive(peer)
Parameters:

peer (Evd.Peer) –

Return type:

(str, size: int)

receive_text(peer)
Parameters:

peer (Evd.Peer) –

Return type:

str

reject_peer(peer)
Parameters:

peer (Evd.Peer) –

Return type:

bool

send(peer, buffer, size)
Parameters:
Raises:

GLib.Error

Return type:

bool

send_text(peer, text)
Parameters:
Raises:

GLib.Error

Return type:

bool

set_peer_manager(peer_manager)
Parameters:

peer_manager (Evd.PeerManager) –

do_accept_peer(peer) virtual
Parameters:

peer (Evd.Peer) –

Return type:

bool

do_create_new_peer() virtual
Return type:

Evd.Peer

do_notify_new_peer(peer) virtual
Parameters:

peer (Evd.Peer) –

do_notify_peer_closed(peer, gracefully) virtual
Parameters:
do_notify_receive(peer) virtual
Parameters:

peer (Evd.Peer) –

do_notify_validate_peer(peer) virtual
Parameters:

peer (Evd.Peer) –

Return type:

int

do_open(address, async_result, cancellable) virtual
Parameters:
do_peer_closed(peer, gracefully) virtual
Parameters:
do_peer_is_connected(peer) virtual
Parameters:

peer (Evd.Peer) –

Return type:

bool

do_receive(peer, buffer, size) virtual
Parameters:
do_reject_peer(peer) virtual
Parameters:

peer (Evd.Peer) –

Return type:

bool

do_send(peer, buffer, size, type) virtual
Parameters:
Return type:

bool

do_signal_new_peer(peer, *user_data) virtual
Parameters:
do_signal_peer_closed(peer, gracefully, *user_data) virtual
Parameters:
do_signal_receive(peer, *user_data) virtual
Parameters:
do_signal_validate_peer(peer, *user_data) virtual
Parameters:
Return type:

int

Signal Details

Evd.Transport.signals.new_peer(transport, object)
Signal Name:

new-peer

Flags:

RUN_LAST, ACTION

Parameters:
Evd.Transport.signals.peer_closed(transport, object, p0)
Signal Name:

peer-closed

Flags:

RUN_LAST, ACTION

Parameters:
Evd.Transport.signals.receive(transport, object)
Signal Name:

receive

Flags:

RUN_LAST, ACTION

Parameters:
Evd.Transport.signals.validate_peer(transport, object)
Signal Name:

validate-peer

Flags:

ACTION

Parameters:
Return type:

int