Lines Matching refs:socket
4 socket::{raw, tcp, udp},
62 let socket = raw::Socket::new( in new() localVariable
70 let handle = GlobalSocketHandle::new_smoltcp_handle(SOCKET_SET.lock_irqsave().add(socket)); in new()
98 if let smoltcp::socket::Socket::Udp(mut sock) = in close()
112 let socket = in read() localVariable
115 match socket.recv_slice(buf) { in read()
142 let socket = in write() localVariable
144 match socket.send_slice(buf) { in write()
157 let socket: &mut raw::Socket = in write() localVariable
187 packet.set_next_header(socket.ip_protocol()); in write()
197 socket.send_slice(&buffer).unwrap(); in write()
272 let socket = udp::Socket::new(rx_buffer, tx_buffer); in new() localVariable
276 GlobalSocketHandle::new_smoltcp_handle(SOCKET_SET.lock_irqsave().add(socket)); in new()
296 fn do_bind(&self, socket: &mut udp::Socket, endpoint: Endpoint) -> Result<(), SystemError> { in do_bind()
306 socket.bind(ip.port) in do_bind()
308 socket.bind(ip) in do_bind()
328 if let smoltcp::socket::Socket::Udp(mut sock) = in close()
343 let socket = in read() localVariable
348 if socket.can_recv() { in read()
349 if let Ok((size, metadata)) = socket.recv_slice(buf) { in read()
377 let socket = socket_set_guard.get_mut::<udp::Socket>(self.handle.smoltcp_handle().unwrap()); in write() localVariable
380 if socket.can_send() { in write()
382 match socket.send_slice(buf, *remote_endpoint) { in write()
402 let socket = sockets.get_mut::<udp::Socket>(self.handle.smoltcp_handle().unwrap()); in bind() localVariable
404 return self.do_bind(socket, endpoint); in bind()
409 let socket = sockets.get::<udp::Socket>(self.handle.smoltcp_handle().unwrap()); in poll() localVariable
412 socket, in poll()
450 let socket = sockets.get::<udp::Socket>(self.handle.smoltcp_handle().unwrap()); in endpoint() localVariable
451 let listen_endpoint = socket.endpoint(); in endpoint()
542 socket: &mut tcp::Socket, in do_listen()
546 socket.listen(local_endpoint.port) in do_listen()
548 socket.listen(local_endpoint) in do_listen()
580 let socket = socketset_guard.get::<tcp::Socket>(sh); in tcp_poll_listening() localVariable
581 socket.is_active() in tcp_poll_listening()
606 .get_mut::<smoltcp::socket::tcp::Socket>(smoltcp_handle) in close()
634 let socket = socket_set_guard in read() localVariable
638 if !socket.is_active() { in read()
643 if socket.may_recv() { in read()
644 match socket.recv_slice(buf) { in read()
647 let endpoint = if let Some(p) = socket.remote_endpoint() { in read()
696 let socket = socket_set_guard in write() localVariable
699 if socket.is_open() { in write()
700 if socket.can_send() { in write()
701 match socket.send_slice(buf) { in write()
732 let socket = socket_set_guard in poll() localVariable
740 return SocketPollMethod::tcp_poll(socket, shutdown_type, is_posix_listen); in poll()
747 let socket = in connect() localVariable
760 match socket.connect(inner_iface.context(), ip, temp_port) { in connect()
769 let socket = sockets.get_mut::<tcp::Socket>( in connect() localVariable
773 match socket.state() { in connect()
826 let socket = Self::create_new_socket(); in listen() localVariable
827 let handle = GlobalSocketHandle::new_smoltcp_handle(sockets.add(socket)); in listen()
841 let socket = sockets.get_mut::<tcp::Socket>(handle.smoltcp_handle().unwrap()); in listen() localVariable
843 if !socket.is_listening() { in listen()
845 self.do_listen(socket, local_endpoint)?; in listen()
944 let socket = sockset.get_mut::<tcp::Socket>( in accept() localVariable
948 if !socket.is_listening() { in accept()
949 self.do_listen(socket, endpoint)?; in accept()
973 let socket = in endpoint() localVariable
975 if let Some(ep) = socket.local_endpoint() { in endpoint()
986 let socket = in peer_endpoint() localVariable
988 return socket.remote_endpoint().map(|x| Endpoint::Ip(Some(x))); in peer_endpoint()