How to send simple file over network!
Hi!!
can any body guide me how to send a simple txt and other files (not media files) over net!
what would i have to do to do so ?
do i have to understand the files headers and got to use udp protocols if yes then plz tell me how
Thank you!
Well thanks for informing me...
But what if i want to send a media file using udp not rtp protocol then should i have to so the same ?
any one going to help me in other way ?
Thank you !
Similar Messages
-
how to edit xml file particular value. and how to send xml file over ip address 192.168.2.10 device using ftp through Ethernet
Hello
For using FTP function in LabVIEW, I recommend you to check this document: FTP Basics
Also, take a look at FTP Browser.vi, which is available at the Example Finder.
To edit a XML file, try to use VIs in XML palette. Maybe Write to XML.vi helps you.
Post your current VI if possible.
Regards
Mondoni -
Hi folks,
I need to send sound files over a network. The files I'm wanting to send are wav files. I kinda have the mechanism that sends a file, but I am not sure how to convert wav files into something that I can easily send. Do I need to convert them into bytes, serialize them...etc I don't know.
Can anyone please point me in the right direction? An example would be very much appreciated.
Thank you,
Ehi
this is very simple
convert voice to bytearray
just create one server socket and client socket then connect a sockets and transmit
download sample from
http://javasolution.blogspot.com/2007/04/voice-chat-using-java.html -
How do you accept files over and IR port?
I am trying to accept files over and IR port and trigger another vi every time a file is received. Has anyone had any luck doing this? I read that you can use the ws2_32.dll to do this but I'm new to calling libraries.
It depends on the protocol that the sender is using. I've used IR, but it simply acted like a serial port. Even if you know that much, you'll want to know how it sends the files. So, a header explaining the number of bytes, filename, and following the data. That would be pretty simple.
I looked at the ws2_32.dll and it appears to be winsock (tcp/ip) and nothing to do with IR.
The LabVIEW Advanced course has a very good section about using Call Library Function nodes. If you find out more about your application, hardware (IR) and communication protocol, we might end up figuring out if we need to use an existing DLL. -
Send BufferedOutputStream content over network in the order I choose
Hi,
The following method send a file over the network, it sends a couple of bytes arrays, including a file.
I need to include the byte arrays and the file array in the same output buffer, and in my code i'm reading the File first to "outFileBuffer.write(buffer, 0, len);" to get the length, and then creating another buffer with the rest of the arrays.
If there was a way to copy the from one buffer to another i had my problem fixed.
public void sendOrder() {
//Enviar encomenda (ver protocolo para identificar formatação dos pacotes)
byte[] tipo = new byte[2];
byte[] dataLength = new byte[4];
byte[] fileNameLength = new byte[4];
byte[] fileName;
byte[] fileLength = new byte[4];
byte[] file;
String fxName;
int fxNameLength;
int len;
int fxLength = 0;
int length;
int BUFFER_SIZE = 1024*50;
byte[] buffer = new byte[BUFFER_SIZE];
fxName = "EO10001.DAD";
fileName = fxName.getBytes();
//Get and Send File Block
try{
//Get File Stream
InputStream is = new FileInputStream("c:\\encomendas\\" + fxName);
//Open Output Streams to send data to server
OutputStream out = socket.getOutputStream();
outBuffer = new BufferedOutputStream(out);
while ((len = is.read(buffer)) > 0){
outFileBuffer.write(buffer, 0, len);
fxLength = fxLength + len;
System.out.println(fxLength);
//initialize file byte array with file length size
file = new byte[fxLength];
//Wrap data into ByteBuffers
ByteBuffer tipoBB = ByteBuffer.wrap(tipo);
ByteBuffer dataLengthBB = ByteBuffer.wrap(dataLength);
ByteBuffer fileNameLengthBB = ByteBuffer.wrap(fileNameLength);
ByteBuffer fileNameBB = ByteBuffer.wrap(fileName);
ByteBuffer fileLengthBB = ByteBuffer.wrap(fileLength);
ByteBuffer fileBB = ByteBuffer.wrap(file);
//Order data to least significant byte first
tipoBB.order(ByteOrder.LITTLE_ENDIAN);
dataLengthBB.order(ByteOrder.LITTLE_ENDIAN);
fileNameLengthBB.order(ByteOrder.LITTLE_ENDIAN);
fileLengthBB.order(ByteOrder.LITTLE_ENDIAN);
//Fill the arrays with the data
tipoBB.put((byte) 0,(byte) 4);
fxNameLength=fxName.length();
length = 32 + fxNameLength + 32 + fxLength;
dataLengthBB.putInt(length);
fileNameLengthBB.putInt(fxNameLength);
fileNameBB.put(fileName);
fileLengthBB.putInt(fxLength);
//fileBB.putInt();
//Write and flush the data to Stream
incoming.append("\n\nSending file...");
outBuffer.write(tipo);
outBuffer.write(dataLength);
outBuffer.write(fileNameLength);
outBuffer.write(fileName);
outBuffer.write(fileLength);
outBuffer.flush();
outBuffer.close();
out.close();
outFileBuffer.flush();
debugData(tipo, dataLength, fileNameLength, fileName, fileLength, file); //append data to JTextArea for debugging purposes
} catch (IOException ex){
ex.printStackTrace();
} // close methodThanks in advance for your help, I hope I was clear.
Regards.darted wrote:
That is not contrary to what I said - FIFO - first in First out.
Yes, your buffer stream - (not TCP/IP packet (your stream will be broken up into many packets) by the way but still they are seeing it as two separate communications.
So, timing will be an issue since you do not want them timing your communication out.
You are sending known sizes on everything else, so create an out buffer of the inbuffer size plus known additional then send the two to the out stream. That will hopefully prompt them to look for complete data.
Are you sure they are not timing out your communication?
Edited by: darted on Dec 17, 2008 2:46 PMYou are right, it's FIFO, what i meant to say is that, the same order that i put things in the buffer is the same order that goes out to the stream, so it's the order i like it to be.
What i realize from my testing is that whatever i put in the buffer before sending it, goes all in one packet (because is a small amount of data off course, but this will always be true), so i figure, if i can put the file in the same buffer I had my problem fixed, so sending two buffers (which is what i already was doing) is not, i think, the solution i want.
They are not timing out my communication that i know, in the log file i can see that it receives my first packet, but it says the packet is incomplete (because the file should be part of this packet) :S
Sure their's application should be able to get around this, but that's out of my control unfortunately.
I'm still trying to put everything else in the same buffer before sending it. -
How to send XML file to https server using POST
Hi, I am having an requirement, that I have to connect to https server and I have to pass an input XML file as a response server will give me output XML file.
The certificate validation part is over, I am using FileInputStream to read the XML file and attaching this to connection.getOutputStream(); but server is throwing me DTD does n't match.
Can any body tell me how to send XML file, I have to use any DOM parser to send the XML file, suggest me and give me sample code.
Thanks,Can anybody give me the solution
-
How to send word file as attachment in an email
Hi All,
I have a scenario where the a word document is sent using a file adapter and mail adapter puts it as an attachment and sends it to designated email group.
Now the issue is the attachment that I am getting is text file, but i want it to be a word format file.
Pls advice..
XierHi,
Just give this a shot.
In the file adapter.
Set Additional File(s) .
and follow this document how to send additional file, rules and naming conventions and parameters.
http://help.sap.com/saphelp_nw04/helpdata/en/3c/b4a6490a08cd41a8c91759c3d2f401/content.htm
Itz simple.
<b>Cheers,
*RAJ*</b>
I -
How to sending simple text in the mail body
Hi friends,
How to send simple text in the mail body through ABAP code
plz send me the related code and setting for that mail.
Thanks&Regards,
Srinivastry this...
FORM send_file_as_email_attachment .
DATA: objtxt LIKE solisti1 OCCURS 10 WITH HEADER LINE.
DATA: objpack LIKE sopcklsti1 OCCURS 2 WITH HEADER LINE.
DATA: objhead LIKE solisti1 OCCURS 1 WITH HEADER LINE.
DATA: reclist LIKE somlreci1 OCCURS 5 WITH HEADER LINE.
DATA: objbin LIKE solisti1 OCCURS 10 WITH HEADER LINE.
DATA : i_body TYPE soli_tab WITH HEADER LINE.
DATA: it_attach LIKE it_display1 OCCURS 0 WITH HEADER LINE.
DATA: doc_chng LIKE sodocchgi1.
DATA: tab_lines LIKE sy-tabix.
DATA: att_lines TYPE i.
DATA: lv_lines TYPE i.
DATA: file TYPE string.
data: g_datum like sy-datum.
data: g_datum1(10) type c.
DATA: len TYPE n.
LOOP AT it_email.
CLEAR : objpack,
objhead,
objbin,
objtxt,
reclist.
REFRESH: objpack,
objhead,
objbin,
objtxt,
reclist.
g_datum = sy-datum - 1.
concatenate g_datum6(2) '.' g_datum4(2) '.' g_datum+0(4) into
g_datum1.
doc_chng-obj_descr = 'Aged Stock more than 45 Days'.
CONCATENATE 'Aged Stock more than 45 Days' '-' it_email-vkbur INTO
doc_chng-obj_descr.
CONCATENATE 'Please find enclosed Aged Stock Details ( >45days ) report as on'
g_datum1
INTO objtxt-line SEPARATED BY space.
APPEND objtxt.
objtxt-line = ' '.
APPEND objtxt.
objtxt-line = 'Regards'.
APPEND objtxt.
objtxt-line = 'LIS SAP Projects'.
APPEND objtxt.
objtxt-line =
'PS: Pls send feedback for futher improvements to SAP office.'.
APPEND objtxt.
DESCRIBE TABLE objtxt LINES tab_lines.
READ TABLE objtxt INDEX tab_lines.
doc_chng-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( objtxt ).
CLEAR objpack-transf_bin.
objpack-head_start = 1.
objpack-head_num = 1.
objpack-body_start = 1.
objpack-body_num = tab_lines.
objpack-doc_type = 'TXT'.
objpack-obj_name = 'Run_prog'.
objpack-obj_descr = 'Agestock.txt'.
lv_lines = tab_lines.
APPEND objpack.
*CONCATENATE 'Plant' 'Material Number' 'Qty(More than 45days)'
*'Amount' INTO
it_display SEPARATED BY space.
append objbin.
clear: objbin.
CLEAR:it_display2.
REFRESH it_display2.
it_display2-werks = 'Plant|'.
it_display2-matnr = 'Material Number'.
it_display2-qty = '|Qty > 45 days'.
it_display2-amount = ' |Amount'.
APPEND it_display2.
it_display2-werks = ''.
it_display2-matnr = ''.
it_display2-qty = ''.
it_display2-amount = ''.
APPEND it_display2.
CLEAR : it_display2.
sort it_display1 by amount descending.
LOOP AT it_display1 WHERE werks = it_email-vkbur.
AT FIRST.
*CONCATENATE 'Plant ' 'Material Number' 'Qty(More than 45days)'
*'Amount' INTO
objbin-line SEPARATED BY space.
append objbin.
clear: objbin.
ENDAT.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
EXPORTING
input = it_display1-matnr
IMPORTING
output = it_display1-matnr.
it_display1-qty = TRUNC( it_display1-qty ).
MOVE-CORRESPONDING it_display1 TO it_display2.
APPEND it_display2.
CLEAR:it_display1,it_display2,objbin.
CLEAR:it_display1.
ENDLOOP.
objbin[] = it_display2[].
DESCRIBE TABLE objbin LINES tab_lines.
objhead = 'Suug'.
APPEND objhead.
objpack-transf_bin = 'X'.
objpack-head_start = 3.
objpack-head_num = 1.
objpack-body_start = 1.
objpack-body_num = tab_lines.
objpack-doc_type = 'RAW'.
objpack-obj_name = 'Run_prog'.
objpack-obj_descr = 'Agestock.txt'.
APPEND objpack.
reclist-receiver = '[email protected]'.
reclist-rec_type = 'U'.
APPEND reclist.
=====================================================================
CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
EXPORTING
document_data = doc_chng
commit_work = 'X'
TABLES
packing_list = objpack
object_header = objhead
contents_bin = objbin
contents_txt = objtxt
receivers = reclist
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
operation_no_authorization = 4
OTHERS = 99.
CLEAR : it_email.
ENDLOOP.
ENDFORM. "send_mail
Message was edited by:
Sugumar Ganesan -
Transferring file over network? what can I use besides ssh?
What can I use to transfer file over network besides using ssh?
This is only for experimental purposes. I have used ssh before, by using command like this:
(time cat /run/shm/test/input/totalInput.tar | ssh username@ip-server "cat > /dev/null") 2>>/run/shm/test/p3_UC_ctime_tar.txt
or this, if I tried to compress a file and then transfer:
(time bzip2 -kfc1 /run/shm/test/input/totalInput.tar | ssh username@ip-server "cat > /dev/null") 2>>/run/shm/test/p3_ctime_tar.txt
However, I think ssh is killing my transfer speed. I am getting only 10-20Mbps.. Router should support over 200-300Mbps.
What can I use besides ssh? I was thinking about netcat, but what I don't like is that I have to open port on the other side for each new file transfer.Well, what I am conserned with things like scp and ssh (I tried scp too) is encryption.
I just moved one file over to a server with scp, and I got about 2.1MB/s... which is about 16.8 Mbps..
I am using Linksys E900, which is wireless-N router. Connection exist between two computers only, nothing else is using that router. However, there is another wireless point outside of our room, which is used for public University network. I don't know how much of effect it would have on our set up.
Both computers have plenty of disk space. One computer (actually development board) uses sd-card for its OS and other disk space.
About 200-300Mbps.. is just something I saw on router's specs.
Last edited by kdar (2012-08-19 03:22:28) -
How to send a file from FTP to external server
My requirement is to send a file from FTP to D3(External) server.
Now I am able to store the file in Appln server.
I want to send the file created by the program thru FTP to D3 server.
I know the username,Password,HostID,RFC destination details.
How to send the file from FTP to D3.
If u have any program,Plz send it...
I dont want the function modules name...I want the example code ....
Thanks in advance.Hi Sumi,
You could do it so that you create a .bat or .cmd script to your server which does your ftp transfer.
To do this you must use sm69 to create a external operating system command which you can call from FM SXPG_COMMAND_EXECUTE. To SXPG_COMMAND_EXECUTE you the file you need to transfer as a parameter.
What happens is that your abap program passes the file to windows batch script (.bat .cmd) which will then do the transfer for you.
Here's a sample of ftp-script for windows:
echo open IP_ADDRESS_TO_YOUR_SERVER > c:zftp_transfer.ftp
echo USERNAME>> c:zftp_transfer.ftp
echo PASSWORD>> c:zftp_transfer.ftp
echo put YOUR_FILE>> c:zftp_transfer.ftp
echo quit>> c:zftp_transfer.ftp
ftp -s:c:zftp_transfer.ftp
also take a look here for more details:
http://support.microsoft.com/?kbid=96269
Ok, this might be a bit trivial but if your server is unix/aix etc.. Instead of using batch script you must do a shell script.
Regards,
Ville -
HELP!!! - How to send a file to a server?
How to send a file(as it is) to the server i'm connected to, if i have access to the output-stream?
Ummm read the APIs of anything you don't understand. Documentation is your friend, I hope you are not being lazy. But I'm in a good mood so here:
// Make sure you try to catch any IOExceptions
// Code expanded for clarity;
OutputStream yourOutputStream = getYourOutputStream; // You said you can get the outputstream to the server/socket. I assume you made a connection.
BufferedOutputStream bos = new BufferedOutputStream(
yourOutputStream ); // Always a good idea to use buffers
// Your object is your file
File yourObject = new File("blabla.jpg");
FileInputStream fis = new FileInputStream(yourObject);
byte[] b = new byte[1024]; // A good size read
while( fis.read(b) != -1){// read 1024 bytes into array at a time, returns -1 at end of file
bos.write(); //write to the server
fis.close(); // close the inputstream
yourObject = null; // help the gc
bos.flush(); // flush the buffer, close does this, but it is good form
bos.close(); // close the output to the server--Thunder
PS - The Duketer is in! -
How to send audio files as attachments?There is no attachment option in mail and no share option in MUSIC
i have some voice samples in Music file .how to share those files? or plz tel me where to store the voice samples
-
How to send image file through mail without any attachment
Plz tell me how to send image file through mail without any attachment ( i mean not converting that image into pdf or any format ) i want to send that text or image through mail .
Hi Sandeep,
I think you can setup the type of email in Shared office Settings in transaction S016.
There is an option called <Preset document classes>
You choose this pushbutton to branch to the maintenance screen for the document classes that are directly displayed to users in the Business Workplace for selection when they use the Create function. The name under which the documents are displayed can also be maintained.
http://help.sap.com/saphelp_nw70/helpdata/en/6c/69c30f418d11d1896e0000e8322d00/content.htm
Haven't tried it though.
Regards,
Siddhesh -
How to send a file to a web service
I am developing a web service application which needs to accept a CAD model as input. Would any one tell me how to send a file from a client application to service provider.
thanks in advanceYou can use mime encoding inside your SOAP request, something like this:
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<data>
<file>
<name>filename.zip</name>
<content>FVberI0XlJincJEGmcbVyMOGpdWGl1bYB2r1y2vYicHqq0WYuergigzYB20GvMLZ
Ag9YicHozwLSieOUieDLzgrLCZKncI9dCMvHDg9YicGPdqOVu3vIAMvJDcaOkq0kl0TLExDVCMrZ
DwfSifnVzNr3yxjLkq0kl1rPDgXLicHdB252zxj0zwqGzNjVBsbmyxnLCKPLDcbqq0WPdqOVqxv0
l1jVB3qGmIaWifiGl0LUzM8GmsaWifiGpJ4ncNn0yxj0EhjLzG0kndyYzxiGpdWGl1nPEMuGmJyG
mdaWndiZmYaWmdaWmcbUdqOWmdaWmda0ndi1idaWmdaWig4ncNrYywLSnG0kjsvft0yncG==
</content>
</file>
</data>
</soap:Body>
</soap:Envelope>This can even be accomplished from within Pl/Sql. Otherwise you can use the WS-Attachment feature which is (I think) not yet supported by Oracle.
Regards,
Michiel -
How to send a file as an attachment using mailx
Hi
Can any one tel me how to send a file as an attachment using mailx command in shell script.
Thanks,
Suman.Wrong forum where to ask such questions.
Check this one link:
http://www.unix.com/shell-programming-scripting/18370-sending-email-text-attachment-using-mailx.html?t=18370#post70254
Maybe you are looking for
-
I am now using my sons iPad and want to take the security restrictions off but I've forgotten my password and there does not seem to be any facility to reset. any idea how I can sort this please?
-
Java odcb statment "LIKE" causing problems
I'm working on some java+ odbc and i'm trying to execture a query, Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); String dataSourceName = "sgdat"; String dbURL = "jdbc:odbc:" + dataSourceName; Connectio
-
Friends, I've been digitizing my church's old Sunday services (on cassette) from years past so that they are preserved. I've recorded 24-bit Broadcast-WAV files into logic, which I then process using noise reduction plug-ins to eliminate tape hiss, e
-
Alignment issues with quiz boxes in captivate 7
when viewing quiz check boxes with their associated question they seem aligned in captivate. but when i preview the slide or publish the slide they are no longer aligned. is there a fix for this? my work around was to make the questions white and pla
-
Login / Location timeout?
I just encountered the following situation which prompted what I think is a really good question. On my laptop, I have 3 locations set. Automatic (default) Home (Manually set up; lan uses 10.10.1.x) Office (Manually set up; lan uses 20.20.1.x) At hom