Currently browsing tag

socket programming

How to transfer Large File using C# Socket

Now I will discuss about, how we can transfer a large file (file size in GB) using Microsoft dot net socket programming using C# (C sharp) language. This code has written in Visual Studio 2005 (dot net 2). Basic Knowledge To cover this article you need to read my few …

Asynchronous Socket Client for Beginner

It’s a sample client socket code that code based on MSDN sample code. using System; using System.Net; using System.Net.Sockets; using System.Threading; using System.Text; // State object for receiving data from remote device. public class StateObject { // Client socket. public Socket workSocket = null; // Size of receive buffer. public …

Run any Stored Procedure from Net

Run any Stored Procedure from .Net NOTE: When I am tring to publish that post then getting some problem for HTML rendering so I replace two character. please replace these two character. HTML opening tag with * and HTML closing tag with $. Hi, Now I’m far from socket now …

Run any Stored Procedure from Net version 2

Run any Stored Procedure from .Net – version 2 Please change In my last article I found some limitation and this code also quite large so I’ve write it’s modified code to run stored procedure. It’s more powerful and comparatively very low code and use is also very easy. When …

Send File from Server to Client using C# Socket Programming 6/6

Server codes are here…   Server code: using System; using System.Collections.Generic; using System.Text; using System.Net; using System.Net.Sockets; using System.IO; namespace beginSocketServer { //FILE TRANSFER USING C#.NET SOCKET – SERVER class Program { static void Main(string[] args) { try { Console.WriteLine(“That program can transfer small file. I’ve test up to 850kb …

Send File from Server to Client using C# Socket Programming 4/6

6) Client Action: This section of code is retrieving file name length and by using this file name which was sent by server at the starting of file data. This will require retrieving file name. int fileNameLen = BitConverter.ToInt32(clientData, 0); string fileName = Encoding.ASCII.GetString(clientData, 4, fileNameLen); 7) Client Action: Now received data is saving at …