Solved

irc ctcp protocol

Posted on 1998-12-23
6
200 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
  • 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
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!

 
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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

735 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