분류 전체보기
-
Map.h프로그래밍/툴프로젝트 2013. 12. 29. 23:00
#ifndef ProjectH_Map_H #define ProjectH_Map_H #include #include #include "Point.h" #include "tile.h" namespace ProjectH { class Map { public: // 타일을 그리기 위해 얻는 데이터를 담는 구조체 struct DrawData { int mapType; int imgIndex; int tileType; int tileFormat; int tileDrawX; int tileDrawY; int tileElevation; int startPlayer; int playerTyep; int startObjectType; bool startPoint; float indexY; std::list* ..
-
TcpCAsyncClient프로그래밍/네트워크 프로그래밍 2013. 12. 29. 20:16
class CMyAsysncSocket : public CAsyncSocket { public: public: CMyAsyncSocket(); virtual ~CMyAsyncSocket(); charm_SendBuf[4096];//보낼데이터 버퍼 char*m_pSendCurBuf; //보내야할 버퍼 현재 위치 intm_nSendLeft;//보내기 위해 남은 길이 BOOLAsyncSend(char* pBuf, int nLen); void DoSenBuf(); public: public: virtual void OnConnect(int nErrorCode); virtual void OnRecevie(int nErrorCode); virtual void OnSend(int nErrorCode); virtual..
-
like_server.c프로그래밍/네트워크 프로그래밍 2013. 12. 29. 19:06
#include #include #include #include #include #include #include #define MAXBUF 256 int main() { int ssock, csock; // 소켓 디스크립트 정의 int clen; struct sockaddr_in client_addr, server_addr; // 주소 구조체 정의 char buf[MAXBUF] = "I like you!"; // 클라이언트에 보내줄 문자열 // 서버 소켓 생성 if ((ssock = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP)) < 0) { perror("socket error : "); exit(1); } clen = sizeof(client_addr); // 주소 구조체..
-
like_Client.c프로그래밍/네트워크 프로그래밍 2013. 12. 29. 18:57
#include #include #include #include #include #include #include #define MAXBUF 256 int main() { int ssock; int clen; struct sockaddr_in server_addr; char buf[MAXBUF]; // 소켓을 생성 if ((ssock = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP)) < 0) { perror("socket error : "); exit(1); } clen = sizeof(server_addr); // 소켓이 접속할 주소 지정 memset(&server_addr,0, sizeof(server_addr)); server_addr.sin_family = AF_INE..
-
-
-
-