Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 462
  • Last Modified:

Using sockets on IRC network

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
QuaLjyn
Asked:
QuaLjyn
  • 5
  • 4
  • 2
1 Solution
 
jhanceCommented:
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
 
QuaLjynAuthor Commented:
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
 
jhanceCommented:
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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
QuaLjynAuthor Commented:
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
 
jhanceCommented:
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
 
MoondancerCommented:
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
 
QuaLjynAuthor Commented:
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
 
jhanceCommented:
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
 
QuaLjynAuthor Commented:
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
 
QuaLjynAuthor Commented:
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
 
MoondancerCommented:
Zero point PAQ/refunded, has been pending deletion.
Moondancer
Community Support Moderator @ Experts Exchange
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 5
  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now