WNCInterface

Dependencies:   WncControllerK64F

Fork of WNCInterface by Avnet

Revision:
28:dceb8da78e6d
Parent:
26:81e520908460
diff -r 2dc9461c04dc -r dceb8da78e6d Socket/WncSocket.cpp
--- a/Socket/WncSocket.cpp	Fri Mar 24 21:50:50 2017 +0000
+++ b/Socket/WncSocket.cpp	Fri Mar 24 22:02:33 2017 +0000
@@ -31,21 +31,18 @@
 // Set up the defaults in the constructor.  If the caller doesn't change anything
 // the APN will be set for AT&T, port #40 and timeout 1.5 seconds
 //
-Socket::Socket() : 
+WncSocket::WncSocket() : 
   _sock_type(-1), 
-  _timeout(1500) {
-}
+  _timeout(1500) {}
 
-Socket::~Socket() {
-}
-
+WncSocket::~WncSocket() {}
 
 //
 // ensure we have a WNC Controller attached and initialized by calling to get the 
 // network status,  This will provide us with all the network information.  if we
 // are not connected, will return -1.
 // 
-int Socket::init(int timeout) {
+int WncSocket::init(int timeout) {
 
     _timeout = timeout;
     M_LOCK;
@@ -59,7 +56,7 @@
 // either a TCP or UDP socket. The user is also expected to provide a port #.  
 // If the connection failed for any reason return 0, otherwise, return 1;
 //
-int Socket::connect(char *url, int type, int port) {
+int WncSocket::connect(char *url, int type, int port) {
   int rslt;
   char address[5];
   
@@ -89,7 +86,7 @@
 // -1 if there was an error
 //  0 if we disconnected
 //
-int Socket::disconnect() {
+int WncSocket::disconnect() {
   if( _sock_type<0 )
     return 0;  //nothing is connected currently
 
@@ -100,7 +97,7 @@
   return ret;
 }
 
-void Socket::set_blocking(bool blocking, unsigned int timeout) {
+void WncSocket::set_blocking(bool blocking, unsigned int timeout) {
     blocking = blocking;
     timeout= timeout;