i have looked at loads of websites but i just can't find code for a simple client server application using a console application (visual studios).

I just want an application where:
server waits for connections
client connects to server (display message when connected)
server accepts connection (display another message)

can someone please link some simple source code files or websites? the easier the better

all code i have tried so far have errors in them. I also tried looking up code for sockets and still found nothing