Solved

irc ctcp protocol

Posted on 1998-12-23
6
197 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
Comment Utility
What is "network byte order"?
0
 
LVL 1

Author Comment

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

Expert Comment

by:dwwang
Comment Utility
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
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 
LVL 1

Author Comment

by:aluiken
Comment Utility
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
Comment Utility
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
Comment Utility
Thanks a lot !
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

744 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

16 Experts available now in Live!

Get 1:1 Help Now