34rtyujk

Fork of WizFi310Interface_Legacy by WIZnet

Revision:
2:4ec2fd843038
Parent:
1:e08ea0ee2788
--- a/WizFi310Interface.cpp	Tue May 02 00:31:36 2017 +0000
+++ b/WizFi310Interface.cpp	Mon Nov 27 05:28:45 2017 +0000
@@ -64,6 +64,8 @@
 	return cmdWLEAVE();
 }
 
+
+
 char* WizFi310Interface::getMACAddress()
 {
     return _state.mac;
@@ -84,4 +86,30 @@
 	return cmdWANT(mode);
 }
 
+
+int WizFi310Interface::tcpclient()
+{   
+	
+TCPSocketConnection TCPconnection;
+
+char *p="192.168.200.1";                      // ip of TCP server
+int a=TCPconnection.connect(p,5000);         //  Port of TCP Server
+  
+  
+if(TCPconnection.is_connected())         
+	{
+	char *data="Welcome";
+	printf("The data is  %s\n",data);
+	int  size=strlen(data);
+	
+	int b=TCPconnection.send(data,size); 
+	if(b!=-1)
+	  printf("Data send successfuly\n");
+	else
+	  printf("Data sending falied\n");
+	}
+		return 0;
+	}
 //char* getNetworkMask();
+
+