Skip to content

StepingForward/WinSock2_C_Example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Winsock2.h

This is a small example made for Windows using Winsock2.h in C. It is capable of creating a local server, creating clients with some extra data(name) and allowing them to chat with each other.

Client message -> Local Server -> All other clients

Using

If on windows, no external libraries needed, I used MSVC as the compiler.

When running make sure to have multiple instances allowing you to test easily.

Enter "s" to create a local server.

Enter "c" to create a client which will automatically connect to the server(or another ip, can be specified in code).

When entering as a client write your name and you can chat with other clients connected to the same local server.

In the server window you can see some extra debug info(joining, leaving, messaging).

Hopefully this code can help you some way, have a good day!

About

This is a c example of using winsock2.h

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages