Evd.Socket

g Evd.Socket Evd.Socket GObject.Object GObject.Object GObject.Object->Evd.Socket

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new ()

bind (address, cancellable, callback, *user_data)

bind_addr (address, allow_reuse)

bind_finish (result)

close ()

connect_addr (address, cancellable, callback, *user_data)

connect_finish (result)

connect_to (address, cancellable, callback, *user_data)

get_condition ()

get_family ()

get_local_address ()

get_priority ()

get_remote_address ()

get_remote_address_str (len)

get_socket ()

get_status ()

listen (address, cancellable, callback, *user_data)

listen_addr (address)

listen_finish (result)

set_notify_condition_callback (callback, *user_data)

set_priority (priority)

shutdown (shutdown_read, shutdown_write)

watch_condition (cond)

Virtual Methods

Inherited:

GObject.Object (7)

do_cleanup ()

do_close ()

do_error (error_domain, error_code, error_message, *user_data)

do_handle_condition (condition)

do_new_connection (socket, *user_data)

do_state_changed (new_state, old_state)

Properties

Name

Type

Flags

Short Description

family

Gio.SocketFamily

r/w

The sockets address family

io-stream-type

GObject.GType

r/w

The GObject.GType of the IO stream returned by socket when connected

priority

int

r/w

The priority of the socket when dispatching its events in the loop

protocol

Gio.SocketProtocol

r/w

The id of the protocol to use, or -1 for unknown

socket

Gio.Socket

r

The underlaying socket

status

int

r

The current status of the socket (closed, connected, listening, etc)

type

Gio.SocketType

r/w

The sockets type

Signals

Inherited:

GObject.Object (1)

Name

Short Description

close

error

new-connection

state-changed

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent

GObject.Object

r

Class Details

class Evd.Socket(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

Evd.SocketClass

classmethod new()
Return type:

Evd.Socket

bind(address, cancellable, callback, *user_data)
Parameters:
bind_addr(address, allow_reuse)
Parameters:
Raises:

GLib.Error

Return type:

bool

bind_finish(result)
Parameters:

result (Gio.AsyncResult) –

Raises:

GLib.Error

Return type:

bool

close()
Raises:

GLib.Error

Return type:

bool

connect_addr(address, cancellable, callback, *user_data)
Parameters:
connect_finish(result)
Parameters:

result (Gio.AsyncResult) –

Raises:

GLib.Error

Return type:

Gio.IOStream

connect_to(address, cancellable, callback, *user_data)
Parameters:
get_condition()
Return type:

GLib.IOCondition

get_family()
Return type:

Gio.SocketFamily

get_local_address()
Raises:

GLib.Error

Return type:

Gio.SocketAddress

get_priority()
Return type:

int

get_remote_address()
Raises:

GLib.Error

Return type:

Gio.SocketAddress

get_remote_address_str(len)
Parameters:

len (int) –

Raises:

GLib.Error

Return type:

str

get_socket()
Return type:

Gio.Socket

get_status()
Return type:

Evd.SocketState

listen(address, cancellable, callback, *user_data)
Parameters:
listen_addr(address)
Parameters:

address (Gio.SocketAddress) –

Raises:

GLib.Error

Return type:

bool

listen_finish(result)
Parameters:

result (Gio.AsyncResult) –

Raises:

GLib.Error

Return type:

bool

set_notify_condition_callback(callback, *user_data)
Parameters:
set_priority(priority)
Parameters:

priority (int) –

shutdown(shutdown_read, shutdown_write)
Parameters:
  • shutdown_read (bool) –

  • shutdown_write (bool) –

Raises:

GLib.Error

Return type:

bool

watch_condition(cond)
Parameters:

cond (GLib.IOCondition) –

Raises:

GLib.Error

Return type:

bool

do_cleanup() virtual
Return type:

bool

do_close() virtual
do_error(error_domain, error_code, error_message, *user_data) virtual
Parameters:
  • error_domain (int) –

  • error_code (int) –

  • error_message (str) –

  • user_data (object or None) –

do_handle_condition(condition) virtual
Parameters:

condition (GLib.IOCondition) –

Return type:

bool

do_new_connection(socket, *user_data) virtual
Parameters:
do_state_changed(new_state, old_state) virtual
Parameters:

Signal Details

Evd.Socket.signals.close(socket)
Signal Name:

close

Flags:

RUN_LAST, ACTION

Parameters:

socket (Evd.Socket) – The object which received the signal

Evd.Socket.signals.error(socket, object, p0, p1)
Signal Name:

error

Flags:

RUN_LAST, ACTION

Parameters:
  • socket (Evd.Socket) – The object which received the signal

  • object (int) –

  • p0 (int) –

  • p1 (str) –

Evd.Socket.signals.new_connection(socket, object)
Signal Name:

new-connection

Flags:

RUN_LAST, ACTION

Parameters:
Evd.Socket.signals.state_changed(socket, object, p0)
Signal Name:

state-changed

Flags:

RUN_LAST, ACTION

Parameters:
  • socket (Evd.Socket) – The object which received the signal

  • object (int) –

  • p0 (int) –

Property Details

Evd.Socket.props.family
Name:

family

Type:

Gio.SocketFamily

Default Value:

Gio.SocketFamily.INVALID

Flags:

READABLE, WRITABLE

The sockets address family

Evd.Socket.props.io_stream_type
Name:

io-stream-type

Type:

GObject.GType

Default Value:

<GType EvdConnection>

Flags:

READABLE, WRITABLE

The GObject.GType of the IO stream returned by socket when connected

Evd.Socket.props.priority
Name:

priority

Type:

int

Default Value:

0

Flags:

READABLE, WRITABLE

The priority of the socket when dispatching its events in the loop

Evd.Socket.props.protocol
Name:

protocol

Type:

Gio.SocketProtocol

Default Value:

Gio.SocketProtocol.UNKNOWN

Flags:

READABLE, WRITABLE

The id of the protocol to use, or -1 for unknown

Evd.Socket.props.socket
Name:

socket

Type:

Gio.Socket

Default Value:

None

Flags:

READABLE

The underlaying socket

Evd.Socket.props.status
Name:

status

Type:

int

Default Value:

0

Flags:

READABLE

The current status of the socket (closed, connected, listening, etc)

Evd.Socket.props.type
Name:

type

Type:

Gio.SocketType

Default Value:

Gio.SocketType.INVALID

Flags:

READABLE, WRITABLE

The sockets type