eftf
Fork of WizFi310Interface_Legacy by
Diff: WizFi310Interface.cpp
- Revision:
- 2:d25ec78141e1
- Parent:
- 1:e08ea0ee2788
--- a/WizFi310Interface.cpp Tue May 02 00:31:36 2017 +0000 +++ b/WizFi310Interface.cpp Mon Nov 27 05:30:11 2017 +0000 @@ -64,6 +64,8 @@ return cmdWLEAVE(); } + + char* WizFi310Interface::getMACAddress() { return _state.mac; @@ -83,5 +85,50 @@ { return cmdWANT(mode); } +//int WizFi310Interface::test() +//{ +// return cmdWSTATUS(); +//} + +//int WizFi310Interface::test1() +//{ +// Socket(); +//} + +//int WizFi310Interface::test2() +//{ +// TCPSocketServer(); +// return 0; +//} + +int WizFi310Interface::bind() +{ + TCPSocketServer TCPserver; + TCPSocketConnection TCPconnection; + + TCPserver.bind(80); + + int a=TCPserver.listen(); + + if(a==0) + printf("Listen configuration Successful\n"); + else + printf("Listen configuration failure"); + + + + int b=TCPserver.accept(TCPconnection); + + if(b==0) + printf("Accept configuration Successful\n"); + else + printf("Accept configuration failure"); + char *buffer; + TCPconnection.receive(buffer,strlen(buffer)); + return 0; + +} //char* getNetworkMask(); + +