Solved

Using sockets on IRC network

Posted on 2001-06-07
11
378 Views
Last Modified: 2008-03-03
I'm kinda stuck here. I have been doing a fair amount of programming, but never with sockets before. Neither have I tried to modify events or do some twisted stuff :)

I'm using Borlands C++ Builder 5.0 on a Win2k box

The problem lies in using the right component (right now I'm using the TPowersock) and getting to read and send to the IRC network. Sending the prober commands is not as much of a problem, as to getting and sending the data. Sending, i guess is rather easy with the SendLn(), but detecting with the onPacketrecvd() (which i guess i should use) has been beyond my abilities, since i cannot see that event in the event-viewer (although it's there in the help file)

The question:
How do i talk to such a network, and get data from it (only the basic text)?

a small codeexample, if necessary, would be much appreciated....
0
Comment
Question by:QuaLjyn
  • 5
  • 4
  • 2
11 Comments
 
LVL 32

Expert Comment

by:jhance
ID: 6163242
IRC is NOT a network, (like ETHERNET), nor is it a PROTOCOL (like TCPIP).  You seem to be confusing your terms.

IRC is an APPLICATION and it talks over your network using TCPIP sockets.  It's similar to other network applications like FTP, HTTP, TELNET, etc.

What you need to do is to understand the IRC APPLICATION LEVEL PROTOCOL.  Here is a good place to start:

http://www.irchelp.org/irchelp/rfc/
0
 

Author Comment

by:QuaLjyn
ID: 6163291
hmm, i actually disagree. When you can use the term VPN network, you should be able to call IRC a network :)

anyways, IRC is NOT an application, but things like mIRC is an application.

well, beside that discussion, i do know how to communicate with the IRC commands, but i do not know how to send and receive the strings from it. Therefore i need to know how to use the event OnPacketRecvd and generally receive strings from 'whatever-we-decide-to-call-it' :)
 
0
 
LVL 32

Expert Comment

by:jhance
ID: 6164839
Just because people use terms incorrectly, it doesn't make it correct.  "VPN network" is redundant because the "N" in "VPN" stands for network.  A correct use would be "VPN connection".

IRC is an application that has also become generic for a service.  The IRC application includes an APPLICATION LEVEL PROTOCOL.  Just like internet web browsing uses HTTP.  HTTP is an APPLICATION PROTOCOL that is usually carried over a TCPIP protocol network but there is NO REQUIRMENT that it be so.  You can (in theory at least) run HTTP over a RS-232 serial link.  

If you are well versed in the ins and outs of IRC and its APPLICATION PROTOCOL, it sounds like you just need to understand the basics of WINDOWS sockets programming.

Why not start with the Microsoft WINSOCK Samples in the SDK?  There are a number of web sites like:

http://www.sockets.com/
http://www.codeguru.com

and others that have lots of sockets and WINSOCK examples and code.  There are also many books on this subject, some sockets in general others are Windows sockets specific.
0
 

Author Comment

by:QuaLjyn
ID: 6164859
thanks, but what i really need is the plain and simple explenation of how use that event in that component... :)

i appreciate you helping me with the theoretical part, but right now i just want the practical use :)
0
 
LVL 32

Expert Comment

by:jhance
ID: 6164905
Please READ THE WHOLE THING!!!

Why not start with the Microsoft WINSOCK Samples in the SDK?  There are a number of web sites like:

http://www.sockets.com/
http://www.codeguru.com

and others that have lots of sockets and WINSOCK examples and code.  There are also many books on this
subject, some sockets in general others are Windows sockets specific.
0
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
LVL 1

Expert Comment

by:Moondancer
ID: 6401479
This question was LOCKED with a PROPOSED ANSWER and awaits your decision today.  Once a question is LOCKED with a Proposed Answer, few new experts will step in to help on that question, since the assumption is, you've been helped.  If the Proposed Answer helped you, please accept it and award that expert.  If it did not help you, please reject it and add comments as to status and what else is needed.

If you wish to award multiple experts, just comment here with detail, I'll respond as soon as possible.  As it stands today, you asked the question, got help and not one expert was awarded for the contribution(s) made.  Your response is needed.  I'll monitor through month end, and if you've not returned to complete this, we'll need to decide.  Expert input is welcome (as always) to determine the outcome here if the Asker does not respond.

Your response in finalizing this (and ALL) your question(s) is appreciated.

Site-related HELP:  http://www.experts-exchange.com/jsp/cmtyHelpDesk.jsp
Moondancer
Community Support Moderator @ Experts Exchange
0
 

Author Comment

by:QuaLjyn
ID: 6405248
this did not help me. I wanted a direct answer to a direct problem, and the help was just a 'place to read more'. Had i wanted a 'Place to read more' i wouldn't have given it 200pt...
0
 
LVL 32

Expert Comment

by:jhance
ID: 6406871
I guess you had better ask the moderator to delete this question for you since you seem unwilling to do any work yourself to understand the IRC system and how it works.

>>i wouldn't have given it 200pt...

If you wanted a working application you should have offered a lot more.  200 pts. won't even buy a cup of coffee....
0
 

Author Comment

by:QuaLjyn
ID: 6408680
hehe, i guess we kinda misunderstood eachother. I didn't want a working application, but i didn't want to understand the entire IRC protocol. I wanted working code examples or a narrow area in which to look...

i solved the problem in another way (not quite as pretty, but worked), and it's no longer of interest...

jhance, i want to thank you although the tone has been somewhat harsh from time to time. I understand your view, and share it most of time. Sometimes there just isn't time/strength enough for the perfect solution. Thanks for the help you have given.
0
 

Author Comment

by:QuaLjyn
ID: 6408682
hehe, i guess we kinda misunderstood eachother. I didn't want a working application, but i didn't want
to understand the entire IRC protocol. I wanted working code examples or a narrow area in which to look...

i solved the problem in another way (not quite as pretty, but worked), and it's no longer of interest...


jhance, i want to thank you although the tone has been somewhat harsh from time to time. I understand
your view, and share it most of time. Sometimes there just isn't time/strength enough for the perfect
solution. Thanks for the help you have given.
0
 
LVL 1

Accepted Solution

by:
Moondancer earned 0 total points
ID: 6438330
Zero point PAQ/refunded, has been pending deletion.
Moondancer
Community Support Moderator @ Experts Exchange
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now