SNIC UART Interface library: Serial to Wi-Fi library for Murata TypeYD Wi-Fi module. For more information about TypeYD: http://www.murata.co.jp/products/microwave/module/lbwb1zzydz/index.html
Dependents: SNIC-xively-jumpstart-demo SNIC-FluentLogger-example TCPEchoServer murataDemo ... more
Fork of YDwifiInterface by
Diff: Socket/Socket.h
- Revision:
- 29:6a0ba999597d
- Parent:
- 27:dcc4f34448f0
- Child:
- 31:15c22824cc46
--- a/Socket/Socket.h Tue Apr 01 07:19:19 2014 +0000
+++ b/Socket/Socket.h Mon May 26 05:17:28 2014 +0000
@@ -30,25 +30,28 @@
#ifndef SOCKET_H_
#define SOCKET_H_
-#include "MurataObject.h"
#include "SNIC_Core.h"
#include "SNIC_UartMsgUtil.h"
typedef unsigned long socklen_t;
-namespace murata_wifi
-{
-
#define SNIC_UART_RECVBUF_SIZE 2048
/** Socket file descriptor and select wrapper
*/
-class Socket: public C_MurataObject {
+class Socket {
public:
/** Socket
*/
Socket();
+ /** Set blocking or non-blocking mode of the socket and a timeout on
+ blocking socket operations
+ \param blocking true for blocking mode, false for non-blocking mode.
+ \param timeout timeout in ms [Default: (1500)ms].
+ */
+ void set_blocking(bool blocking, unsigned int timeout=1500);
+
/** Set socket options
@param level stack level (see: lwip/sockets.h)
@param optname option ID
@@ -79,11 +82,13 @@
protected:
int addrToInteger( const char *addr_p );
+ int resolveHostName( const char *host_p );
+
protected:
- int mSocketID;
-#if 0
+ int mSocketID;
bool _blocking;
int _timeout;
+#if 0
GSwifi * _wifi;
bool _server;
@@ -95,6 +100,5 @@
// int select(struct timeval *timeout, bool read, bool write);
};
-}
#endif /* SOCKET_H_ */
muRata

Murata TypeYD