Showing posts with label c++. Show all posts
Showing posts with label c++. Show all posts

Wednesday, October 8, 2008

Check if a specific TCP or UDP port is open

This article will show you how to scan in c++ a TCP or UDP port to see if it’s open.

The TCP (Transmission Control Protocol ) is intended to provide a reliable process-to-process communication service in a multinetwork environment. The TCP is intended to be a host-to-host protocol in common use in multiple networks.

User Datagram Protocol (UDP) is one of the core protocols of the Internet Protocol Suite. Using UDP, programs on networked computers can send short messages sometimes known as datagrams (using Datagram Sockets) to one another.

UDP does not guarantee reliability or ordering in the way that TCP does. Datagrams may arrive out of order, appear duplicated, or go missing without notice. Avoiding the overhead of checking whether every packet actually arrived makes UDP faster and more efficient, for applications that do not need guaranteed delivery.

Sunday, October 5, 2008

Remote control PC's across a LAN

This is a basic remote control application for Windows formed from two modules. One that runs as server and listen to ports 5001 and 5002 (5001 used for image transfer and 5002 for mouse commands, keyboard is not implemented), and the second one which runs as client.

The application was written in c++ and compiled using Microsoft Visual Studio. NET 2003 (7.1).It can still be compiled using Microsoft Visual Studio. NET 2002 but you should edit ".vcproj" file (change Version="7.10" with Version="7.00").

As technology has been used MFC (Microsoft Foundation Classes), API (Application Programming Interface), ATL (Active Template Library), COM (Component Object Model), + GDI (Graphical Device Interface +) and STL (Standard Template Library).

Building A SOAP Client With Visual C++

SOAP is an acronym that comes from "Simple Object Access Protocol". It's used for exchanging XML-based messages over computer networks, normally using HTTP/HTTPS. SOAP forms the foundation layer of the web services protocol stack providing a basic messaging framework upon which abstract layers can be built.

If you want to build a SOAP client you can choose to use different open source solutions available on internet. Also you can opt for Microsoft SOAP Toolkit which is a set of DLLs which can be exploited from an any language within the COM (Component Object Model) family (as long, of course, as the executable is running on a Win32 system).

In this article I will show you a more simple method (in my opinion) based on IXMLHTTPRequest which provides client-side protocol support for communication with HTTP servers.

An introduction to bitwise operators

This article gives a brief overview of C style bitwise operators.
Because a lot of people seem to have problems with bitwise operators I had decide to write this short tutorial on how to use them.

There are six bitwise operators:

  • & AND
  • | OR
  • ^ XOR
  • ~ NOT
  • >> Right Shift
  • <<>