| | |
using send() + recv()
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: May 2008
Posts: 99
Reputation:
Solved Threads: 1
im just wondering how you use send() and recv()
like:
i know that wouldnt compile but you get the point?
like:
cpp Syntax (Toggle Plain Text)
bool blah() { if(recv(send("10.1.1.1", "HI"), szBuffer, sizeof(szBuffer)) { MessageBox(NULL, "WORKED", "??", MB_OK); return true; } else { MessageBox(NULL, "FAIL", "??", MB_OK); return false; } }
i know that wouldnt compile but you get the point?
•
•
Join Date: May 2008
Posts: 99
Reputation:
Solved Threads: 1
i dont need smart ass remarks.
edit: figured it myself.... although its slow "connecting" and when it cant "connect" i get an access violation. any ideas why?
edit: figured it myself.... although its slow "connecting" and when it cant "connect" i get an access violation. any ideas why?
cpp Syntax (Toggle Plain Text)
bool TestConnection(char *IP) { connection conn = connect_to_server(IP, 6500); if(rrecv(conn, szBuffer, sizeof(szBuffer))) { endconnection(conn); return true; } else { endconnection(conn); return false; } }
Last edited by FTProtocol; Aug 18th, 2008 at 4:05 am.
![]() |
Similar Threads
- Winsock C++ help: receiving data (C++)
- Winsock Multi-Client Servers (C++)
- recv error and synchronization problems (C)
- file transfer across network (Networking Hardware Configuration)
- send() and recv() functions (Networking Hardware Configuration)
- Data loss in Type Conversion. (C++)
- how do I send structures using csocket across network? (C)
- Winsock Send File To Client Help (C++)
Other Threads in the C++ Forum
- Previous Thread: PLzzzzzzzzz HELpppppppppppppppp
- Next Thread: Ping type function
| Thread Tools | Search this Thread |
Tag cloud for C++
api application array arrays based beginner binary bmp c++ c/c++ calculator char char* class classes code compile compiler console conversion convert count data delete deploy dll download dynamic dynamiccharacterarray encryption error file format forms fstream function functions game givemetehcodez graph gui homeworkhelp iamthwee ifstream input int java lib library linkedlist linker list loop looping loops map math matrix memory microsoft newbie news number numbertoword output pointer problem program programming project python random read recursion recursive reference rpg simple sorting string strings temperature template templates test text text-file tree url variable vector video visual visualstudio void win32 windows winsock wordfrequency wxwidgets






