Eric Jung / GMMP_mbed_Ethernet_Reinit

Dependents:   ThingPlug_Ethernet_Example

Fork of GMMP_mbed by Eric Jung

Embed: (wiki syntax)

« Back to documentation index

Network.h File Reference

Network.h File Reference

TCP Socket 통신을 위한 모듈 More...

Go to the source code of this file.

Functions

void CloseSocket ()
 서버와 연결된 TCP Socket을 닫는다.
int Connect ()
 TCP Socket을 연결한다.
int WriteTCP (char *pBuf, int nLen)
 TCP Socket에 Write한다.
int ReadTCP (char *_pBuf, const int _nMaxlen)
 TCP Socket을 Read한다.
int ReadTCP2 (char *_pBuf, const int _nMaxlen, byte blocking)
 TCP Socket을 Read한다.
int CheckSocket ()
 TCP Socket 세션 유지를 확인한다.

Detailed Description

TCP Socket 통신을 위한 모듈

Date:
2015/07/20
Version:
0.0.1.0

Definition in file Network.h.


Function Documentation

int CheckSocket (  )

TCP Socket 세션 유지를 확인한다.

세션이 연결이 되어 있지 않다면 연결을 시도한다.

Returns:
성공 : GMMMP_SUCCESS, 실패 : ErrorCode.h 참조

Definition at line 25 of file Network.cpp.

void CloseSocket (  )

서버와 연결된 TCP Socket을 닫는다.

Definition at line 17 of file Network.cpp.

int Connect (  )

TCP Socket을 연결한다.

Returns:
성공 : GMMMP_SUCCESS, 실패 : ErrorCode.h 참조

Definition at line 30 of file Network.cpp.

int ReadTCP ( char *  _pBuf,
const int  _nMaxlen 
)

TCP Socket을 Read한다.

Parameters:
_pBufRead 버퍼 포인트.
_nMaxlenRead 버퍼 최대 크기
Returns:
성공 : GMMMP_SUCCESS, 실패 : ErrorCode.h 참조

Definition at line 99 of file Network.cpp.

int ReadTCP2 ( char *  _pBuf,
const int  _nMaxlen,
byte  blocking 
)

TCP Socket을 Read한다.

(Blocking/Non-blocking 지원)

Parameters:
_pBufRead 버퍼 포인트.
_nMaxlenRead 버퍼 최대 크기
blockingblocking: 1, non-blocking: 0
Returns:
성공 : GMMMP_SUCCESS, 실패 : ErrorCode.h 참조

Definition at line 106 of file Network.cpp.

int WriteTCP ( char *  pBuf,
int  nLen 
)

TCP Socket에 Write한다.

Parameters:
pBufWrite 버퍼 포인트.
nLenWrite 버퍼 크기.
Returns:
성공 : GMMMP_SUCCESS, 실패 : ErrorCode.h 참조

Definition at line 82 of file Network.cpp.