Jump to content

[REQUEST] Simple C# tut about sockets

- - - - -

  • Please log in to reply
5 replies to this topic

#1
sijmenjan

sijmenjan

    Newbie

  • Members
  • Pip
  • 3 posts
Hello guys, I'm Sijmen Schoon and I'm new here. I have signed up for this site because I think it is a good forum with a lot of much knowing guys. I hope I can learn a lot here (and teach other guys with the experience I already have)

OK, to go on to go on with my question:

I want to let two PCs speak to each other using sockets, so my friend can do things with my PC, for example killing or starting a specific process.

I've researched a lot, but I don't really understand the tuts I find on google.

So do you guys know a good tutorial (or write me one) so I can continue coding?

I know I need to use sockets, but I don't understand how to implement them into my program.

Edited by sijmenjan, 07 August 2010 - 05:29 PM.
Changed the title (was "Simple CS tut about sockets" first)


#2
Roger

Roger

    If nothing goes right, go left.

  • Administrators
  • 718 posts
  • Programming Language:C, PHP
  • Learning:Python
Welcome, Sijmen!

Have you done some basic reading online already? I would suggest Socket Class (System.Net.Sockets)
Check out our update Guidelines/FAQ. When posting code, remember to use code tags - Posted Image.

#3
sijmenjan

sijmenjan

    Newbie

  • Members
  • Pip
  • 3 posts
Yeah, I know I need to use sockets. But I have no idea how to use them (at least, how to implement them in my program).
And yes, I used Google until the results started being irrelevant...

Cheers, Sijmen

#4
Roger

Roger

    If nothing goes right, go left.

  • Administrators
  • 718 posts
  • Programming Language:C, PHP
  • Learning:Python
Probably better if you post some code first so the members can help you figure out what you want to do. It is unlikely someone will post a solution for you without you first trying some coding.
Check out our update Guidelines/FAQ. When posting code, remember to use code tags - Posted Image.

#5
sijmenjan

sijmenjan

    Newbie

  • Members
  • Pip
  • 3 posts
OK, but I don't think it will be easy for me, because these sockets are the base of my program :)

But I'll try my best at the command-processing part, I don't have any other projects to do (so happy to be a 13 year old: free VS2005/08/10 pro, lots of time).

I think I'll restart tomorrow (because the code I have at the moment is everything but usable :cool:)

Greets, Sijmen

#6
kepp

kepp

    Newbie

  • Members
  • Pip
  • 2 posts
What you need to do is googling, there are MANY MANY ways to use sockets, I prefer "Asyncronous". search google for "Asyncronous Socket Chat".
Play around, make misstakes, this is the only way you'll learn about sockets, understand delegates, events and most important how a socket works.
Don't be affraid to try.. I've been writing plenty of socket softwares, I started out rough, The Direct Connect Protocol...
Good luck




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users