Go Premium for a chance to win a PS4. Enter to Win

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

irc ctcp protocol

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
aluiken
Asked:
aluiken
  • 3
  • 2
1 Solution
 
dwwangCommented:
What is "network byte order"?
0
 
aluikenAuthor Commented:
That's a good one. I am giving 250 points for the sollution =)
0
 
dwwangCommented:
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!

 
aluikenAuthor Commented:
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
 
BlackManCommented:
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
 
aluikenAuthor Commented:
Thanks a lot !
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

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