Networking...

This is a discussion on Networking... within the Networking/Device Communication forums, part of the General Programming Boards category; Hi, Im programming in C#, but these questions are just basic networking I think. I have a program thats connected ...

  1. #1
    Registered User
    Join Date
    Jul 2003
    Posts
    110

    Networking...

    Hi, Im programming in C#, but these questions are just basic networking I think.

    I have a program thats connected to the internet thru X port. Is it possible to just listen to that port for incoming and out going data?

    Also, Is it possible to inject data into the TCP stream?

    I know the protocol (IRC) protocol. My problem is I have a IRC bot for my IRC room and well, it be much easier if I could just program the bot in a language I like and know. Also, I could just program the client in one language, but my computer and network is setup so It creates problems if I have mutliple connections to IRC.

  2. #2
    Registered User
    Join Date
    Sep 2004
    Location
    California
    Posts
    3,246
    Is it possible to just listen to that port for incoming and out going data?
    The easiest way to do this is to use a library called pcap (or winpcap for Windows). There is a program called Ethereal which uses pcap to monitor port traffic. Ethereal is free, and works very well.

    Also, Is it possible to inject data into the TCP stream?
    This is much harder to do. It would be far easier to code an IRC bot from scratch than to learn how to inject TCP packets.

    I know the protocol (IRC) protocol. My problem is I have a IRC bot for my IRC room and well, it be much easier if I could just program the bot in a language I like and know.
    What's the problem then? If you know the IRC protocol and you know a programming language, then start coding!

    Also, I could just program the client in one language, but my computer and network is setup so It creates problems if I have mutliple connections to IRC.
    This doesn't make sense. How can your computer or network be set up to disallow multiple IRC connections?

  3. #3
    Registered User
    Join Date
    Sep 2004
    Posts
    197
    Quote Originally Posted by bithub
    This doesn't make sense. How can your computer or network be set up to disallow multiple IRC connections?
    Actually, its probably the IRC network thats blocking him. A number of them will only allow a very limited number of conections to the network at a time, some only allow 1 per IP.
    If any part of my post is incorrect, please correct me.

    This post is not guarantied to be correct, and is not to be taken as a matter of fact, but of opinion or a guess, unless otherwise noted.

  4. #4
    Registered User
    Join Date
    Jul 2003
    Posts
    110
    Im using C#. How does TCP stream injection work. I have done lots of server/client programming before in C# so I have the basics. Do you attach ur program to the open stream and write to it? Is there key terms I should search for? ALso I ment my network only allows 1 connection. I actually wrote the bot and intergrated a client into the C# application. Now my main question is how do you write to an active TCP stream.

  5. #5
    Registered User
    Join Date
    Sep 2004
    Location
    California
    Posts
    3,246
    You can't do TCP injection with C#. You need to either write a intermediate driver, or a LSP. Either way, you have to use C.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. networking comfirmation
    By rEtard in forum Networking/Device Communication
    Replies: 1
    Last Post: 07-20-2005, 03:59 PM
  2. Uhh networking help?!?
    By Shadow12345 in forum Tech Board
    Replies: 13
    Last Post: 09-29-2002, 11:39 PM
  3. Beyond MFC : COM || Networking
    By kuphryn in forum Windows Programming
    Replies: 5
    Last Post: 04-25-2002, 04:28 PM
  4. C++: Reference Book, GUI, Networking & Beyond
    By kuphryn in forum C++ Programming
    Replies: 4
    Last Post: 11-10-2001, 07:03 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21