add getsock(), setsock()

Fork of WIZnetInterface by IOP

Files at this revision

API Documentation at this revision

Comitter:
jcm931213
Date:
Wed Nov 22 06:03:30 2017 +0000
Parent:
23:1a89f410e1e4
Commit message:
add getscok, setsock

Changed in this revision

Socket/TCPSocketConnection.cpp Show annotated file Show diff for this revision Revisions of this file
Socket/TCPSocketConnection.h Show annotated file Show diff for this revision Revisions of this file
--- 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
--- 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;