Windows C socket programming for UDP client - c

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.

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

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).

Related

how to use zerotier in socket programming?

I am trying to create a file sharing application in which socket programming is done through c language and GUI is done using java. I am connecting c and java using JNI(java native interface).
Now to install this appication in different systems and establish communication between these application I was thinking of using zerotier, but I am not sure how to use zerotier to do this work of file sharing.
ZeroTier provides a BSD-style socket layer via the SDK (libzt).
Documentation / Examples: docs.zerotier.com/sockets
Github Repo: zerotier/libzt.
Basically you'd just build the library into your application and call the special ZT sockets in the same way you'd call normal sockets.

Running C code in erlang

How to run c code in Erlang? Please explain with simple example.
Basically I am trying to post data on a server with this.I will trigger the C code through Erlang and then this C code will post data to server.
This question comes back very often: one of the best answers is here
I would also add ports to the mix. Do not confuse them with port drivers: ports vs port drivers
For your use case ports should be the best option. Nifs can crash Erlang VM, so they are only for optimizing critical code. Port drivers have similar problems. C nodes mimic Erlang VM and I haven't seen good use case for them yet.
Ports are just normal OS processes with a protocol used to communicate with Erlang VM. This is usually the default way to go, when you want to call some C code from Erlang.

establish bluetooth piconet connection between server and two clients using c on linux platform?

I want to establish Bluetooth network where one server can communicate to two clients (ie piconet) using C programm on linux platform, rfcomm based communication.
Can any one please share your guidance or sample source code if have.
I newbie to the bluetooth technology, have not found any useful info or code from internet source so far. so please.
Thank you
Basu
Linux runs open source BlueZ Bluetooth Stack, which works quite well (unless you need Bluetooth Low Energy). You can check out this tutorial: http://people.csail.mit.edu/albert/bluez-intro/c404.html
PS. Mind the GPL license when using #include like in those examples.
Edit:
As for creating piconet specifically, I'm afraid I don't have any snippets. However, after quick search, I would look into using bluez library to open not one but many RFCOMM sockets. So you can listen to and accept multiple connections.

Reasons for using RPC

I am planning on writing a client/server application. Both the server and client components will be written in C. I was looking at C socket libraries which can help me with this project and I started to read about RPC.
Is RPC used in most client/server programs?
What are the reasons to use RPC as opposed to writing your own socket code?
ONC RPC originated in the 1980's and has been worked on since then; consequently, it's very robust, efficient, and documented.

Linux and Windows socket APIs

I want to port some Linux-specific code to Windows which contains socket operations. Is there any third party library available for Linux/BSD sockets to Winsock mapping like the pthread-w32 library, which is used for the threading operation? Also, I can't use the Cygwin tool chain.
Well, I'm still working on this, but it's a start for new programs: https://sourceforge.net/projects/libxc/

Resources