Embedded Tools
  Home arrow Embedded Tools arrow Page 2 - HTTP Requesting with eVC++ 3.0 on Windows ...
IBM developerWorks
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Dedicated Servers  
Actuate Whitepapers 
VeriSign Whitepapers 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
EMBEDDED TOOLS

HTTP Requesting with eVC++ 3.0 on Windows CE 3.0
By: Ben Shepherd
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 13
    2003-05-20

    Table of Contents:
  • HTTP Requesting with eVC++ 3.0 on Windows CE 3.0
  • Protocols and Packets
  • Creating your HTTP Request
  • Conclusion

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
    Iron Speed
     
    ADVERTISEMENT

    At the virtual BlackBerry Technical Seminar 2008, you can ask your development questions directly of Research In Motion® (RIM) experts, and take advantage of learning opportunities designed uniquely for BlackBerry solution developers. Register Today!

    HTTP Requesting with eVC++ 3.0 on Windows CE 3.0 - Protocols and Packets


    (Page 2 of 4 )

    TCP/IP

    TCP/IP, as you are well aware, is the most widely used network protocol. Since we are working with WinCE 3.0 or Windows CE 3.0, you should be aware that TCP/IP is the only protocol supported as standard. The TCP/IP protocols are accessed via Sockets.

    TCP/IP was developed so solve the problem of inconsistent network protocols. The two protocols were designed by the Department of Defense (DoD) to create a network of networks, which we call the Internet. The TCP and IP protocols will be discussed separately.

    The Internet Protocol (IP)

    Basically, to exchange data from one computer to another, both computers must be using the same protocol. So there needs to be a standard protocol that each system uses so that data is available on every terminal. The standard protocol is IP for communicate over the internet. Each terminal has an IP address and, by use of a modem, can send and retrieve data to any other terminal using the TCP/IP protocol.

    The Internet Protocol (IP) is the most common network protocol supporting applications processing data.  The main purpose of this protocol is to transmit network packets from one terminal to another. This is done by forwarding each packet, which is based on a four byte destination address (i.e. the IP address).

    See RFC791 for more details.

    TCP

    TCP asks as the governor of a packet delivery. Problems may arise when a packet is sent over the network. This is where TCP steps in. If a packet is undelivered, TCP assures that the packet is resent. This process will continue until the end user destination terminal receives the packet and acknowledges a successful transaction.

    A Packet

    As stated previously, the TCP/IP protocol transmitted packets. So, let’s go through the elements needed from a packet so that you have a reasonable understanding about the technology used Windows CE OS.

    The fields contained in the header, and their functions, are:

    • Version Number
    • Internet Header Length (IHL)
    • Type of Service (TOS)
    • Total Length
    • Identification
    • Flags
    • Fragment Offset
    • Time-to-Live (TTL)
    • Protocol
    • Header Checksum
    • Source Address
    • Destination Address
    • Packet Options

    Version Number: This specifies the IP version of the packet. The current version of IP is version 4, so this field will contain the binary value 0100.

    Internet Header Length (IHL): This specifies the length of the datagram header in 32 bit, which is 4 octets, words. The minimum-length header is 20 octets. This means that this field always has a value of at least 5 (i.e. 0101). The maximum value of this field is 15. The IP Header is a maximum of 60 octets.

    Type of Service (TOS): Allows an originating host to request different classes of service for packets it transmits.

    Total Length: Indicates the length (in bytes, or octets) of the entire packet, including both header and data. The maximum size of an IP packet is 64 KB, which is 65,535 bytes.

    Identification: This is used when a packet is fragmented into smaller pieces sent via the Internet. This identifier is assigned by the sender so that different fragments arrive at the destination terminal and is able to be associated with each other for reassembly.

    Flags: This field is also used for fragmentation and reassembly. There are three fragments.

    • The first bit is called the More Fragments (MF) bit, and is used to indicate the last fragment of a packet so that the receiver knows that the packet can be reassembled.
    • The second bit is the Don't Fragment (DF) bit, which suppresses fragmentation.
    • The third bit is unused (and always set to 0).

    Fragment Offset: Indicates the position of this fragment in the original packet.

    • The offset will be zero in the first packet of a fragment stream.
    • In the other fragments, the offset in increments of 8 bytes.

    Time-to-Live (TTL): A value from 0 to 255, indicating the number of hops that this packet is allowed to take before discarded within the network. The packet will be discarded if a router gets a zero value.

    Note: Every router that receives the packet will decrement the TTL value by one hop.

    Protocol: Indicates the higher layer protocol contents of the data carried in the packet; options include TCP, which is valued at 6.

    Header Checksum: Carries information to ensure that the received IP header is error-free. Remember that IP provides an unreliable service and, therefore, this field only checks the header rather than the entire packet.

    Source Address: Represents the IP address of the sender of the packet.

    Destination Address: Represents the IP address of the host intended to receive the packet.

    Packet Options: A set of requirements on the path the packet takes through the network (i.e. source route). The route taken by a packet may be traced (i.e. record route) and packets may be labelled with security features.

    Now, let's find out how to use this technology to make HTTP Requests.

    More Embedded Tools Articles
    More By Ben Shepherd


     

    EMBEDDED TOOLS ARTICLES

    - A New Toolbar Can Boost Your Web Site Traffi...
    - Programming Custom Hardware for Windows
    - Developing Embedded Systems - A Tools Introd...
    - WAP for Fun and Profit - Part 1 - Basic WML ...
    - HTTP Requesting with eVC++ 3.0 on Windows CE...


    Iron Speed





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway