🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.lang.vbasic
Article #104845

Transfer plików via Socket

#104845
From: Jędruś
Date: Wed, 08 Jun 2011 08:51
39 lines
2291 bytes
Witam

Program w VB.Net

Jest program jako serwer nasłuchujący wiadomości od klientów na
określonym porcie.
Wykorzystuje do tego klasę serverSocket z metodą Accept. Mogę odbierać
wiadomości od client-ów.


Pojawia się pytanie, jak odbierać pliki (np: *.csv)
Po stronie client-a jest metoda SendFileTo, ale po stronie serwera nie
wiem jak go odebrać.

Program client jest na urządzeniach i wysyła plik csv oraz taką
wiadomość (niestety, nie moje dzieło i nie mam na to wpływu co on
wysyła):

<code>
POST /metnet/mps5.php?net=bms&id=42&ip=xxx.xxx.xxx.xxx HTTP/1.1
Host:
xxx.xxx.xxx.xxx789012
Content-Type: multipart/form-data;
boundary=---------------------------4827543632391
Content-Length: 08563

-----------------------------4827543632391
Content-Disposition: form-data; name="MAX_FILE_SIZE"

30000
-----------------------------4827543632391
Content-Disposition: form-data; name="MESSG"; filename="0000042.csv"
Content-Type: application/octet-stream

<code/>

Zależy mi na odbieraniu pliku a nie wiadomości.

Proszę o pomoc
Technical Details
Message-ID: <d6a73174-a1b6-4ddd-bf35-be99571f1d15@x10g2000yqj.googlegroups.com>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!newsfeed2.atman.pl!newsfeed.atman.pl!goblin2!goblin.stu.neva.ru!feeder3.cambriumusenet.nl!feed.tweaknews.nl!postnews.google.com!x10g2000yqj.googlegroups.com!not-for-mail

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!newsfeed2.atman.pl!newsfeed.atman.pl!goblin2!goblin.stu.neva.ru!feeder3.cambriumusenet.nl!feed.tweaknews.nl!postnews.google.com!x10g2000yqj.googlegroups.com!not-for-mail
From: Jędruś <anowacki.pila@interia.pl>
Newsgroups: pl.comp.lang.vbasic
Subject: Transfer plików via Socket
Date: Wed, 8 Jun 2011 01:51:39 -0700 (PDT)
Organization: http://groups.google.com
Lines: 40
Message-ID: <d6a73174-a1b6-4ddd-bf35-be99571f1d15@x10g2000yqj.googlegroups.com>
NNTP-Posting-Host: 83.18.255.10
Mime-Version: 1.0
X-Trace: posting.google.com 1307523099 10236 127.0.0.1 (8 Jun 2011 08:51:39 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Wed, 8 Jun 2011 08:51:39 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: x10g2000yqj.googlegroups.com; posting-host=83.18.255.10; posting-account=96L34woAAADPw3buWDWlsliW2KsLUmpO
User-Agent: G2/1.0
X-Google-Web-Client: true
X-Google-Header-Order: HUALESNKRC
X-HTTP-UserAgent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0.1) Gecko/20100101 Firefox/4.0.1,gzip(gfe)
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit