Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

irc ctcp protocol

Posted on 1998-12-23
6
Medium Priority
?
207 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
Independent Software Vendors: 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 1000 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

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…
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

721 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