Sponsored Content
Full Discussion: File Transfer over Sockets
Top Forums Programming File Transfer over Sockets Post 302274428 by mcnikolas on Wednesday 7th of January 2009 02:29:07 PM
Old 01-07-2009
My question is how to create the function that sends a file in C++/C . Because Java has a Class like : BufferedOutputStream , but C hasn't.
When i send a string for example over the socket i use the function : send(new_fd, (char *) str, strlen(str), 0) but i do not know what to do when i have a file , how should i transform the "send" function?
The gstreamer part is irrelevant , do not worry about that, just focus on the client/server .
 

10 More Discussions You Might Find Interesting

1. Programming

Sockets and File descriptors

I am in a Systems programming class this semester, and our current project is to write a program utilizing sockets and fork. For the project, I decided to make my own instant messaging program. I have the code completed, but I have a problem that keeps old clients from communicating with new... (3 Replies)
Discussion started by: gstlouis
3 Replies

2. Shell Programming and Scripting

file transfer

hi all how do i copy a file from one server to another thanks bkan77 (4 Replies)
Discussion started by: bkan77
4 Replies

3. UNIX for Dummies Questions & Answers

Transfer the file

Dear all, Can anybody let me know how to automate a file transfer process to a remote m/c thru SFTP , automate means it will not prmpt for password. how i am going to achive this....and what all methods are available or tools are available ???? (2 Replies)
Discussion started by: manas_ranjan
2 Replies

4. Shell Programming and Scripting

File transfer

Hi All, it might not be an sound question, i have two server like A and B.. i want to transfer file from B to A ..here i have some questions.. 1) do we need to create private and public key to connect..and transferring files...from B to A..? 2) i tried with scp options like... (2 Replies)
Discussion started by: Shahul
2 Replies

5. Programming

Problem in file transfer using sockets

Hai Friends I am writing a c program to transfer files from one system to another using TCP/IP socket programming.. My Recieve Program #include <stdio.h> #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> extern int errno; extern char *sys_erlist; void... (2 Replies)
Discussion started by: collins
2 Replies

6. Programming

Sending large file through sockets

Hello, I am trying to send a file (1 MB) through sockets and for some reason I am getting segmentation fault message and receiving in the server an incomplete file. The current file is about 3 pages long and need to send it from the client to the server. I've tried malloc with free(), I am now... (8 Replies)
Discussion started by: sfcddm1
8 Replies

7. Programming

File transfer in C

HI Can anyone provide me with codes for file transfer server to client or vice versa? Also please explain how to compile those programs in ubuntu terminal as i am totally new to socket programming. Thanks (0 Replies)
Discussion started by: mayhemtrigger
0 Replies

8. Shell Programming and Scripting

Avoiding file overwrite during file transfer using scp

Hi, I have written a small script to transfer a file from one unix server to other using scp command which is working fine. As I know with scp, if any file with the same name is already present on destination server, it would get overwritten without any notification to user. Could anyone help me... (14 Replies)
Discussion started by: dsa
14 Replies

9. Shell Programming and Scripting

File transfer script

Hi, I need a shell script to transfer a file from one server(unix box) to another server(windows box). I have the details of the source and destination Ip's. source path : /home/UNIX/server filename:abc.txt Destination folder: D:/UNIX/test I am using AIX server. Type of shell :... (1 Reply)
Discussion started by: NareshN
1 Replies

10. UNIX for Advanced & Expert Users

File transfer

When using FTP to transfer a file from IBM iSeries family of servers client to a non IBM Iseries family server, files might have characters appear in the wrong format Eg | in Iseries and while transferring fro Iseries system to Linux , but instead of | it is showing as ?. Please advise (3 Replies)
Discussion started by: sudhainit
3 Replies
Net::EPP::Frame::Command::Transfer::Contact(3pm)	User Contributed Perl Documentation	  Net::EPP::Frame::Command::Transfer::Contact(3pm)

NAME
Net::EPP::Frame::Command::Transfer::Contact - an instance of Net::EPP::Frame::Command::Transfer for contact objects. SYNOPSIS
use Net::EPP::Frame::Command::Transfer::Contact; use strict; my $info = Net::EPP::Frame::Command::Transfer::Contact->new; $info->setOp('query'); $info->setContact('REG-12345'); print $info->toString(1); This results in an XML document like this: <?xml version="1.0" encoding="UTF-8"?> <epp xmlns="urn:ietf:params:xml:ns:epp-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd"> <command> <transfer op="query"> <contact:transfer xmlns:contact="urn:ietf:params:xml:ns:contact-1.0" xsi:schemaLocation="urn:ietf:params:xml:ns:contact-1.0 contact-1.0.xsd"> <contact:id>REG-12345E<lt>/contact:id> </contact:transfer> </transfer> <clTRID>0cf1b8f7e14547d26f03b7641660c641d9e79f45</clTRIDE<gt> </command> </epp> OBJECT HIERARCHY
L<XML::LibXML::Node> +----L<XML::LibXML::Document> +----L<Net::EPP::Frame> +----L<Net::EPP::Frame::Command> +----L<Net::EPP::Frame::Command::Transfer> +----L<Net::EPP::Frame::Command::Transfer::Contact> METHODS
$frame->setContact($contactID); This specifies the contact object for the transfer. $frame->setAuthInfo($pw); This sets the authInfo code for the transfer. AUTHOR
CentralNic Ltd (http://www.centralnic.com/). COPYRIGHT
This module is (c) 2012 CentralNic Ltd. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. SEE ALSO
o Net::EPP::Frame perl v5.14.2 2012-04-23 Net::EPP::Frame::Command::Transfer::Contact(3pm)
All times are GMT -4. The time now is 10:48 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy