Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
N

nahumtakum

@nahumtakum
About
Posts
14
Topics
8
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Finding DB2 and Oracle Servers on the Network
    N nahumtakum

    I have read this article on finding SQL servers on the network (http://www.codeproject.com/cs/database/LocatingSql.asp) Does anyone know how to find DB2 and Oracle Servers on the Network ?

    Database database oracle com sysadmin tutorial

  • Read form exe.config file
    N nahumtakum

    Hi Nick ! Can you please supply me the Test.exe.config file you are working with in your article ? Thanks.

    C# sysadmin xml tutorial question

  • Read form exe.config file
    N nahumtakum

    Hi there ! I want to create a configurtion file, something like ProjectName.exe.config file, which will include XML elemnts that don't have "key" and "value". For example: <server id='BR.1.ET' address='127.0.0.1' dbg='true' maxClients='4' description='Server details'> I want to read without going through all the nodes and attributes. Is there something similar to this method: String dsn = ConfigurationSettings.AppSettings["pubs"]; ? Bye

    C# sysadmin xml tutorial question

  • TemplatePrinte source code
    N nahumtakum

    Hi There ! I have downloaded the file printtemplates.exe from the VS.Net. I want to use it, but would like to make some changes. Does anyone knows how to get the source code ? Is there another similar open source application ?

    C# csharp visual-studio tutorial question

  • Print a web page
    N nahumtakum

    Hi There ! I am trying to develop a control which will be added to web pages and will allow to make "friendly print". I have tried to look for something similar and couldn't find anything. I have found some answers dealing with css, which includes the lines: img{ visible:none} It allows me to print only some of the elements. I want to create header and footer of my own. I have read this article, which is aproposal of standard for css, which I'm afraid wasn't carried out. (http://www.pwg.org/xhtml-print/HTML-Version/CSS-Print.html) @page { counter-increment: pages; @bottom{ font-family: Times, Palatino, serif; font-size: 80%; font-weight: normal; text-align: center; content: "Page " counter(pages); } } Does anyone has any idea what to do ? (without handling the registry...)

    C# html css windows-admin question announcement

  • Where can I find installutil.exe ?
    N nahumtakum

    I know it should be there... But its not !!! Can you please send it to nahumtakum@hotmail.com ?

    C# csharp dotnet visual-studio question announcement

  • Where can I find installutil.exe ?
    N nahumtakum

    Hi There ! I'm trying to create a Windows Service (not a Web Service) in C#. I am using VS.Net Enterprise Architect: Microsoft Development Environment 2002 Version 7.0.9466 Microsoft .NET Framework 1.0 Version 1.0.3705 I read about installutil.exe but I can't find it. Can someone tell me where can I find it ? Thanks.

    C# csharp dotnet visual-studio question announcement

  • How to "kill" a socket
    N nahumtakum

    I have created the following class: public class Mobile : IDisposable { private TcpListener tcpListener public Socket sockToClient } public Mobile (string Remote_Ep) { IPHostEntry hoen = Dns.Resolve(Remote_Ep); IPEndPoint ep = new IPEndPoint(hoen.AddressList[0], 11000); tcpListener = new TcpListener(ep); tcpListener.Start(); Thread t = new Thread( new ThreadStart(thread_proc_IO) ); t.Start(); } private void thread_proc_IO() { bool fDone = false; while( !fDone ) { try { Console.Write("\n[tid {0}]: Listening on port {1}", GetCurrThread.id(), mb_frs_port ); sockToClient = tcpListener.AcceptSocket(); // @@@ if( sockToClient.Connected ) { Console.Write("\n[tid {0}] Client connected", GetCurrThread.id()); ClientHandler Handler = new ClientHandler(sockToClient); Handler.StartRead(); } } catch (Exception ex) { Console.Write( "\nMobile.thread_proc_IO: [tid {0}] Exception in I/O thread - exiting. " + ex.Message, GetCurrThread.id() ); fDone = true; } } } I am creating several instances of this class, and adds every instance to ArrayList. When I am trying to remove one of the instances, removing it from the ArrayList is not enough I am trying to use dispose, sockToClient_dbg.Shutdown(SocketShutdown.Both), sockToClient.Close(), tcpListener.Stop() but nothing seem to work. I also read about this bug located at www.dotnet247.com/247reference/msgs/1/8442.aspx : "The TCPClient has some known bugs. One of them is that a TCP-connection is NOT closed - when you call .Close(), .Dispose() method. I spent a long time figuring this out. I used Sockets instead at it all worked perfectly...." Does anyone has any idea how to kill this socket ?

    C# com help tutorial question

  • A lot of Sockets
    N nahumtakum

    Hi again ! YOu wrote: "When you "accept" a request, you then get the socket, whereby this socket responds solely to the requesting client and no other." But, I want to send data to some of my clients: 1. I don't want to reply - I want to send something to a certain client without the need to recieve something from him right now. 2. I want to be able to send the message to some client - for example, to send data to clietn_ID: 1, 3, 5. How can I do this ?

    C# sysadmin tutorial question

  • A lot of Sockets
    N nahumtakum

    Hi and thanks for you help ! I know that I can recieve the information through one socket. But, I need my server to distinguish between the various clients. I want to know who send a message to the server. In adition, I want to be able to send a message to a specific client - not to all of them together !

    C# sysadmin tutorial question

  • A lot of Sockets
    N nahumtakum

    My server socket already uses Accept method. The thing is that I eant to avoid this situation: IPEndPoint a_EndPoint = new IPEndPoint(ipAddress, a_port); IPEndPoint b_EndPoint = new IPEndPoint(ipAddress, b_port); ... // Create a TCP/IP socket. Socket a_listener = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp ); Socket b_listener = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp ); // Bind the socket to the local endpoint and listen for incoming connections. try { a_listener.Bind(a_EndPoint); a_listener.Listen(num_of_clients); // The maximum length of the queue of pending connections b_listener.Bind(b_EndPoint); b_listener.Listen(num_of_clients); // The maximum length of the queue of pending connections ... while (true) { // Set the event to nonsignaled state. all_done.Reset(); // Start an asynchronous socket to listen for connections. Console.WriteLine("Waiting for a connection..."); a_listener.BeginAccept( new AsyncCallback(accept_callback_a), a_listener ); b_listener.BeginAccept( new AsyncCallback(accept_callback_b), b_listener ); ... // Wait until a connection is made before continuing. all_done.WaitOne(); You see, I have to create a new object for socket, and to create each one its own function and its own delegat... How can I avoid this ? Thanks.

    C# sysadmin tutorial question

  • A lot of Sockets
    N nahumtakum

    Hi There ! I am trying to build a server - client application, using tcp/ip and sockets. I would like that the server will be able to listen to some clients, and if a new client "shows up", the server notice the new client and will add it to other clients. Can someone show me an example for something like this ? Thanks.

    C# sysadmin tutorial question

  • TCP, channels, sockets sync or async ?
    N nahumtakum

    What is the difference between version no.1: TcpListener tcplpop = new TcpListener(110); tcplpop.Start(); Socket s = tcplpop.AcceptSocket() // Blocks until someone calls s.Send(...) s.Receive(...) and version no.2: IPEndPoint dbg_EndPoint = new IPEndPoint(ipAddress, dbg_port); Socket dbg_listener = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp ); dbg_listener.Bind(dbg_EndPoint); dbg_listener.Listen(num_of_devices); dbg_listener.BeginAccept( new AsyncCallback(AcceptCallback), dbg_listener ); // Get the socket that handles the client request. Socket listener = (Socket) ar.AsyncState; Socket handler = listener.EndAccept(ar); // Create the state object. StateObject state = new StateObject(); state.workSocket = handler; handler.BeginReceive( state.buffer, 0, StateObject.BufferSize, 0, new AsyncCallback(ReadCallback), state); Thanks.

    C# sysadmin question

  • TCP, channels, sockets sync or async ?
    N nahumtakum

    Hi everyone! I want to write an application which has a server and some clients. I would like them to communicate with tcp/ip. I would like to send and recieve all kinds of data. I have read about TCPListener, TCPClient, channels, sockets sync and async methods. What are the diffrences between those methods ? Which is the better way ? Thanks.

    C# sysadmin question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups