Struct cold_iron::net::ThaumSocket [−]
pub struct ThaumSocket { /* fields omitted */ }
Implementations
impl ThaumSocket
impl ThaumSocket
pub fn create(thaum: impl Thaumatic) -> Result<ThaumSocket, ThaumError>
pub fn create(thaum: impl Thaumatic) -> Result<ThaumSocket, ThaumError>
Attempt to create a thaumatic socket. No connections will be made until it is bound or summoned.
pub async fn bind(
&mut self,
address: RunicAddress
) -> Result<ThaumListener, ThaumError>
pub async fn bind(
&mut self,
address: RunicAddress
) -> Result<ThaumListener, ThaumError>
Attempt to bind a thaumatic socket to a runic address. May return an error if the address is in use elsewhere. If you are correctly using your assigned addresses, this should not happen!