2

I am trying to lookup some example programs for windows socket. Particularly, I am interested in writing a client in C (in visual studio) which communicates to the server using UDP. I din't find any concrete material. I tried some examples but got some linking errors. Is there any library available. Please let me know. Thanks in advance.

1
  • Please ask specific questions on SO. Do you have example code and the errors we could help you with? Commented Feb 5, 2012 at 7:56

2 Answers 2

1

The Apache Portable Runtime supports sockets, and it is cross platform.

Sign up to request clarification or add additional context in comments.

Comments

0

I've found a simple library, which provides implementation of networking, but it is for C++. (C++ Socket Class for Windows). You can look at it's implementation of working with sockets, or just use it (there are examples of simple client and server).

3 Comments

I had already looked at that. 2 things: I want to speed up my application and C++/ Java call malloc and do heap transactions which slow down the processes. So, I was thinking of implementing everything in C. As a worst case, I can use this. But I got linking errors LNK2019 Error error LNK2019: unresolved external symbol ___WSAFDIsSet@
8 referenced in function "public: bool __thiscall SocketSelect::Readable(class Socket const * const)" (?Readable@SocketSelect@@QAE_NQBVSocket@@@Z) c:\Users\saurabh17g\documents\visual studio 2010\Projects\ArdroneSocket\ArdroneSocket\Socket.obj Looks like I need to link a DLL to support this. Do you have any idea as the way to do that?
You need to add ws2_32 library to your linker options. Try #pragma comment(lib, "ws2_32.lib")

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.