[]Struct gio::SocketListener

pub struct SocketListener(_, _);

A SocketListener is an object that keeps track of a set of server sockets and helps you accept sockets from any of the socket, either sync or async.

Add addresses and ports to listen on using SocketListenerExt::add_address and SocketListenerExt::add_inet_port. These will be listened on until SocketListenerExt::close is called. Dropping your final reference to the SocketListener will not cause SocketListenerExt::close to be called implicitly, as some references to the SocketListener may be held internally.

If you want to implement a network server, also look at SocketService and ThreadedSocketService which are subclasses of SocketListener that make this even easier.

Implements

SocketListenerExt, glib::object::ObjectExt, SocketListenerExtManual

Implementations

impl SocketListener[src]

pub fn new() -> SocketListener[src]

Creates a new SocketListener with no sockets to listen for. New listeners can be added with e.g. SocketListenerExt::add_address or SocketListenerExt::add_inet_port.

Returns

a new SocketListener.

Trait Implementations

impl Clone for SocketListener

impl Debug for SocketListener

impl Default for SocketListener[src]

impl Display for SocketListener[src]

impl Eq for SocketListener

impl Hash for SocketListener

impl IsA<SocketListener> for SocketService

impl IsA<SocketListener> for ThreadedSocketService

impl Ord for SocketListener

impl<T: ObjectType> PartialEq<T> for SocketListener

impl<T: ObjectType> PartialOrd<T> for SocketListener

impl StaticType for SocketListener

Auto Trait Implementations

impl RefUnwindSafe for SocketListener

impl !Send for SocketListener

impl !Sync for SocketListener

impl Unpin for SocketListener

impl UnwindSafe for SocketListener

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<Super, Sub> CanDowncast<Sub> for Super where
    Sub: IsA<Super>,
    Super: IsA<Super>, 

impl<T> Cast for T where
    T: ObjectType, 

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ObjectExt for T where
    T: ObjectType, 

impl<'a, T> ToGlibContainerFromSlice<'a, *const GList> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 

type Storage = (Option<List>, Vec<Stash<'a, <T as GlibPtrDefault>::GlibType, T>>)

impl<'a, T> ToGlibContainerFromSlice<'a, *const GPtrArray> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 

type Storage = (Option<PtrArray>, Vec<Stash<'a, <T as GlibPtrDefault>::GlibType, T>>)

impl<'a, T> ToGlibContainerFromSlice<'a, *mut GArray> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 

type Storage = (Option<Array>, Vec<Stash<'a, <T as GlibPtrDefault>::GlibType, T>>)

impl<'a, T> ToGlibContainerFromSlice<'a, *mut GList> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 

type Storage = (Option<List>, Vec<Stash<'a, <T as GlibPtrDefault>::GlibType, T>>)

impl<'a, T> ToGlibContainerFromSlice<'a, *mut GPtrArray> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 

type Storage = (Option<PtrArray>, Vec<Stash<'a, <T as GlibPtrDefault>::GlibType, T>>)

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T> ToValue for T where
    T: SetValue + ?Sized

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.