473,385 Members | 1,848 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

How to Send an Arraylist Via Winsock in C#..Net 2.0

Hi,,,,

i want to send an ArrayList which may have Strings and objects etc, via Winsock, in C#.Net 2.0

when i send strings,.. the Clent receives the String,
=====================================

Winsock1.SendData("hai"); //--------------Client Receives it


but when i try to send an array list, nothing happens.
=======================================

ArrayList _arr = new ArrayList();

_arr.Add("hai");

Winsock1.SendData(arr); //------------------Nothing happens in the Client Side



Please somebody help Me.
Sep 11 '08 #1
4 2039
Plater
7,872 Expert 4TB
This is a regular vb6 application yes?
As winsock is not a valid .NET control.
I will move it to there in a bit.
I would guess that it does not know how to convert your arraylist into bytes to send it down the socket though.
Sep 11 '08 #2
joedeene
583 512MB
Hi,,,,

i want to send an ArrayList which may have Strings and objects etc, via Winsock, in C#.Net 2.0

when i send strings,.. the Clent receives the String,
=====================================

Winsock1.SendData("hai"); //--------------Client Receives it


but when i try to send an array list, nothing happens.
=======================================

ArrayList _arr = new ArrayList();

_arr.Add("hai");

Winsock1.SendData(arr); //------------------Nothing happens in the Client Side



Please somebody help Me.
well in the .net framework, most of the winsock and more are available in the system.net namespace
Sep 11 '08 #3
Plater
7,872 Expert 4TB
well in the .net framework, most of the winsock and more are available in the system.net namespace
Not on any of .NET I have seen.
There is System.Net.Sockets though, which should be what you use (or some derrived/alternative .NET class like TcpClient or HttpWebRequest or etc)
Sep 11 '08 #4
joedeene
583 512MB
Not on any of .NET I have seen.
There is System.Net.Sockets though, which should be what you use (or some derrived/alternative .NET class like TcpClient or HttpWebRequest or etc)

well i meant like most of the winsock's functions, im not familiar with vb 6 and older i've never used it, but i know that under the system.net namespace there is another namespace(i think .sockets) that has a .senddata function within the .socket class and also tcpclient too, which you can use for the same purpose, sorry for being more clear/precise.
Sep 11 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: simon | last post by:
Always when I need data reader in my programs, I simply have functions, which creates it for me: Dim rdr As SqlDataReader dim sql as string sql="myStoredProcedure" rdr =...
7
by: Nadav | last post by:
Hi I am writing some kind of a storage system that have to deal with large amounts of data passing over the net, Now, I Wonder... traditional programming would use win32 Winsock DLL as the means...
3
by: Hiroyuki Tanaka | last post by:
Dear Readers, I am trying to learn C# network programming and I have discovered that Windows TCPIP often joins small packets and send them as one to the remote server. This appears to be a...
1
by: Raichu | last post by:
Hi All, I'm new to VC++.net and I searched through the forums and couldn't find anything related to this. I'm trying to send a flat file from a VC++.net program to a PHP file residing on a...
2
by: Walter CF | last post by:
Hi, I develop an application that send mail using system.web.mail namespace, It work without problems over Windows Xp, but in windows 98 it dont't work, I've read from...
2
by: yvan | last post by:
Hi, Here is my client/server scenario: Step1: Client connects to server and sends data sucessfully (using Socket.Send()). Step2: Server gracefully exists (calls Socket.Shutdown() and...
1
Frinavale
by: Frinavale | last post by:
Hi there, I'm currently using VB .Net to develop a web application that sends emails periodically. Everything works fine in the test environment but not on the real server. After reviewing the...
1
by: mse07 | last post by:
hi for every one i have program use to send e-mil using winsock and i try to send e-mail from this program but i failure i write the code of program in here and i want to help me to solve...
0
by: johnemisylpaler | last post by:
can you teach me how to use winsock how to send a data to other computer using winsock in vb6.0... help me master... im john. i am a student of one of the Computer school in Phillipines help me...
0
by: PradeepDotMax | last post by:
Hi,,,, i want to send an ArrayList which may have Strings and objects etc, via Winsock, in C#.Net 2.0 when i send strings,.. the Clent receives the String,...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.