0

hi,
I am working on a project
and regarding that i want to know how can i send a file to a computer
on the LAN using C / C++ program
PLEASE HELP ME OUT

4
Contributors
3
Replies
4
Views
12 Years
Discussion Span
Last Post by Salem
0

Well i learned this on emonth back in Computer Networks. For this you will need to programs one server and other reciver. the coding of which i give below:: Here i will mention the coding for transmitting a character. If you still need to transmiot a file tell me, i will try to send you the program for it as well.
Server:

#include <stdio.h>
#include <dos.h>
#include<conio.h>

int main(void)
{
   int port = 0;
   char value = 'A';
   char result;

   clrscr();
   outport(port, value);
   printf("Value %c sent to port number %d\n", value, port);
   getch();

   result=inport(port);
   printf("Received value is %c",result);
   getch();

}

Client:

#include <stdio.h>
#include<dos.h>
#include<conio.h>
void main()
{
 char result;
 clrscr();
 outport(0x2fb,0x87);
 outport(0x2f8,0x0c);
 outport(0x2f9,0x00);
 outport(0x2fb,0x07);
 if(inport(0x2fd)!=0x61)
 {
	result=inport(0x2f8);
	printf("your character has been received:%c", result);
 }
 getch();
 }
-1

Can You Please Tell How Do I Send A Complete File Through The Lan Port??
Thanx
Amna

Votes + Comments
Useless 3-year "me too" bump
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.