add getsock(), setsock()
Fork of WIZnetInterface by
Revision 24:7de48630cdef, committed 2017-11-22
- Comitter:
- jcm931213
- Date:
- Wed Nov 22 06:03:30 2017 +0000
- Parent:
- 23:1a89f410e1e4
- Commit message:
- add getscok, setsock
Changed in this revision
diff -r 1a89f410e1e4 -r 7de48630cdef Socket/TCPSocketConnection.cpp --- a/Socket/TCPSocketConnection.cpp Thu Sep 03 01:10:54 2015 +0000 +++ b/Socket/TCPSocketConnection.cpp Wed Nov 22 06:03:30 2017 +0000 @@ -144,3 +144,10 @@ } return readLen; } +int TCPSocketConnection::getsock(void) { + return _sock_fd; +} + +void TCPSocketConnection::setsock(int sock){ + _sock_fd=sock; +} \ No newline at end of file
diff -r 1a89f410e1e4 -r 7de48630cdef Socket/TCPSocketConnection.h --- a/Socket/TCPSocketConnection.h Thu Sep 03 01:10:54 2015 +0000 +++ b/Socket/TCPSocketConnection.h Wed Nov 22 06:03:30 2017 +0000 @@ -72,6 +72,8 @@ \return the number of received bytes on success (>=0) or -1 on failure */ int receive_all(char* data, int length); + int getsock(void); + void setsock(int sock); private: bool _is_connected;