Commit Graph

14 Commits (400fd82972f8dbfaedb78ffabcee32bfe1f8a550)

Author SHA1 Message Date
Kevin Bracey 0f6a4cd0bd InternetSocket: Use atomics, not volatile
Use a better tool for the job.
2019-01-18 15:37:11 +02:00
Deepika 09b4bc07ce This is the initial version of stats implementation in network layer.
SocketStats Class is added to collect and provide the statistics information.
In this phase only socket information is collected and max sockets that can
be recorded at any time are configurable through 'MBED_CONF_NSAPI_SOCKET_STATS_MAX_COUNT'

Network statistics can be enabled through a macro MBED_NW_STATS_ENABLED

More information on design is captured in #8743
2018-11-26 09:42:39 -06:00
Seppo Takalo 46c46019bc Refactor DTLSSocket to use Socket::getpeername()
Also, let DTLSSocket to be a friend of InternetSocket so it can do
the name resolution from its _stack.

+ Some whitespace fixes
2018-11-19 15:19:49 +02:00
Seppo Takalo 619bcb5b4e Implement Socket::getpeername() API
This is equivalent of POSIX getpeername() function. It allows to
get remote address associated with the socket.
For example:
socket *s = server.accept();
SocketAddress remote;
s->getpeername(&remote);
2018-11-13 11:02:51 +02:00
Cruz Monrreal 9403a2f16c
Merge pull request #8499 from michalpasztamobica/master
Socket closing improvements and tests adjustments
2018-10-29 08:47:25 -05:00
Cruz Monrreal II e8728148ac Merge branch 'docs-fix-networkiface' of ssh://github.com/paul-szczepanek-arm/mbed-os into rollup 2018-10-26 11:48:45 -05:00
Michal Paszta 0da0f16d60 TCPSocket accept refactored to close cleanly and icetea test added
Private constructor called in TCPSocket accept, when creating a new Socket.
Close() method calls moved "up" to InternetSocket.
InternetSocket::close() returns proper error code when no socket available.
Add TcpSocket::accept icetea tests.
Deleting sockets moved to teardown.
2018-10-26 12:02:25 +03:00
Amanda Butler 6db0f67690
Edit InternetSocket.h
Edit file, mostly for branding, commas and U.S. spelling.
2018-10-25 14:49:48 -05:00
paul-szczepanek-arm e31337dab7 remove redundancy and maintainance overhead 2018-10-24 20:49:28 +01:00
paul-szczepanek-arm fd0612b763 update internetsocket docs 2018-10-24 16:50:35 +01:00
Martin Kojtal b46aa6108d netsocket: astyle fix 2018-08-03 13:34:33 +01:00
Seppo Takalo 2b60e42756 Close Doxygen group at the end of file 2018-06-20 12:38:07 +03:00
Seppo Takalo 407b2f275d Move accept() to abstract socket class and implement in TCPSocket
Deprecate TCPServer in favor of just TCPSocket::accept()
2018-06-20 12:38:07 +03:00
Seppo Takalo cdbe43c0d5 Refactor Sockets by moving functions up into common base.
* Move IP Socket stuff to InternetSocket class which is inherited by TCP/UDP
* Implement sendto() and recvfrom() on TCP socket
* Implement connect() call on UDP
* Implement send() and recv() calls on UDP socket
2018-06-20 12:38:06 +03:00