Solved

irc ctcp protocol

Posted on 1998-12-23
6
201 Views
Last Modified: 2010-05-18
Hi i am writing an dcc send program and i am stuc. When my socket receives 1024 bytes it should send the total amount received back to the dcc-server-client (in this case 1024) but it has to be in "network byte order" ??? does anyone have any idea's?

Greets
0
Comment
Question by:aluiken
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 4

Expert Comment

by:dwwang
ID: 1352681
What is "network byte order"?
0
 
LVL 1

Author Comment

by:aluiken
ID: 1352682
That's a good one. I am giving 250 points for the sollution =)
0
 
LVL 4

Expert Comment

by:dwwang
ID: 1352683
Never heard of "network byte order" before. If I'm not wrong, although machines can have different byte orders, network protocols (such as TCP/IP)will always "translate" them so that you program base on the network won't be aware of them.

So are you talking about implementing a low-level protocol?
0
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!

 
LVL 1

Author Comment

by:aluiken
ID: 1352684
I quote:

The recipient should acknowledge each packet by transmitting
      the total number of bytes received as an unsigned, 4 byte
      integer in network byte order. The sender should not continue
      to transmit until the recipient has acknowledged all data
      already transmitted. Additionally, the sender should not
      close the connection until the last byte has been
      acknowledged by the recipient.

0
 
LVL 7

Accepted Solution

by:
BlackMan earned 250 total points
ID: 1352685
Network Byte Order is what usally is called "Big Indian". There is a WinSock function to do the conversion called "hlton" (l for Long) Use ntohl to convert the other way around...
The functions are declared in the WinSock unit.

Here's a little description about it:
Network-byte Order
Since Windows Sockets applications can't possibly be aware of what type of remote computer system that they will be dealing with a priori, it is necessary to define a common data representation model for vital information. Windows Sockets chose the big-endian model for the "on-the-wire" data representation, known as network byte order.


0
 
LVL 1

Author Comment

by:aluiken
ID: 1352686
Thanks a lot !
0

Featured Post

Technology Partners: 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!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

734 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