Search Results

Search found 7249 results on 290 pages for 'executive messages'.

Page 21/290 | < Previous Page | 17 18 19 20 21 22 23 24 25 26 27 28  | Next Page >

  • C socket programming: recv / select not seeing sent messages

    - by Fantastic Fourier
    Hey guys, I had some questions, about socket programming for client-server using TCP/IP. I am using select() to recv(), which works fine when client send() messages to server, but not the other way around. The send() returns positive (and reasonable) numbers of bytes sent by server but I know that the nubmer of bytes "sent" really means "sent out of the socket", not "sent and was received by the client." The select() function seems to work fine. So given that, my guess is that it's the send() function that is giving me the problem. Probably the address of client in send() is not correct. But when I compared address.sin_addr.s_addrmember (it's an unsigned long int) of struct sockaddr_in from recv() and send() of server, they are identical. So I am kind of lost as to what could be wrong?

    Read the article

  • Find the base revision,message

    - by Vepr
    I have a task: "Find base revision: select latest SVN revision that has message "TRANSLATION_BASE_EN_NO". If tag was found - get all the resources from that revision" How can I read messages, and search for the revision I need? I want to see a piece of code of course. In C# (vs2008) Thanks

    Read the article

  • Keeping messages in queue in case of receiver crash

    - by John Doe
    Hi, We've a Spring JMS message listener container for receiving messages asynchronously. Using DefaultMessageListenerContainer and in sessionTransacted mode. I understand being in sessionTransacted mode means in case of an exception the message will be put back into the queue. But how can I make sure the message won't be deleted from the queue even if the receiver (which is picked the message) crashes or just the machine running it looses power? At first I thought CLIENT_ACKNOWLEDGE acknowledge mode should save me, but apparently it's not the case, Spring calls .acknowledge() no matter what. So here's my question, how can I guarantee the delivery? Using a custom MessageListenerContainer? Using a transaction manager?

    Read the article

  • Multiple python scripts sending messages to a single central script

    - by Ipsquiggle
    I have a number of scripts written in Python 2.6 that can be run arbitrarily. I would like to have a single central script that collects the output and displays it in a single log. Ideally it would satisfy these requirements: Every script sends its messages to the same "receiver" for display. If the receiver is not running when the first script tries to send a message, it is started. The receiver can also be launched and ended manually. (Though if ended, it will restart if another script tries to send a message.) The scripts can be run in any order, even simultaneously. Runs on Windows. Multiplatform is better, but at least it needs to work on Windows. I've come across some hints: os.pipe() multiprocess Occupying a port mutex From those pieces, I think I could cobble something together. Just wondering if there is an obviously 'right' way of doing this, or if I could learn from anyone's mistakes.

    Read the article

  • C++ error message output format

    - by sub
    If I want to trigger an error in my interpreter I call this function: Error( ErrorType type, ErrorSeverity severity, const char* msg, int line ); However, with that I can only output Name error: Undefined variable in line 1 instead of Name error: Undefined variable 'someVariableName' in line 1 I'm working entirely with strings (except for the error messages as they all are constant at the moment), so sprintf won't work. What is the best way to create an efficient error function that can output a constant message combined with a string that describes which object, e.g.: a non-existing variable, triggered the error?

    Read the article

  • PHP difference between notice and warning

    - by Stegeman
    When writing code errors, warnings and notices can occur. I know the idea behind errors. I suppose a warning is there to inform you about something that can cause an error, but isn't a notice exaclty the same? I suppose a notice is not a message of something doing right ;). It's just a bit confusing to me. Can anybody tell the difference between those two and the way these messages should be treated.

    Read the article

  • Localize Strings in Javascript

    - by SaaS Developer
    I'm currently using .resx files to manage my server side resources for .Net. The application that I am dealing with also allows developers to plugin javascript into various event handlers for client side validation, etc.. What is the best way for me to localize my javascript messages and strings? Ideally, I would like to store the strings in the .resx files to keep them with the rest of the localized resources. I'm open to suggestions.

    Read the article

  • Adding Timestamp to Java's GC messages in Tomcat 6

    - by ripper234
    I turned on Java's GC log options -XX:+PrintGC -XX:+PrintGCTimeStamps -XX:+PrintGCDetails Which print out these messages to standard output (catalina.out): 314.884: [CMS-concurrent-mark-start] 315.014: [CMS-concurrent-mark: 0.129/0.129 secs] [Times: user=0.14 sys=0.00, real=0.13 secs] 315.014: [CMS-concurrent-preclean-start] 315.016: [CMS-concurrent-preclean: 0.003/0.003 secs] [Times: user=0.00 sys=0.00, real=0.00 secs] 315.016: [CMS-concurrent-abortable-preclean-start] 332.055: [GC 332.055: [ParNew: 17128K->84K(19136K), 0.0017700 secs] 88000K->70956K(522176K) icms_dc=4 , 0.0018660 secs] [Times: user=0.00 sys=0.00, real=0.00 secs] CMS: abort preclean due to time 352.253: [CMS-concurrent-abortable-preclean: 0.023/37.237 secs] [Times: user=0.78 sys=0.02, real=37.23 secs] How can I make these log lines appear with an actual timestamp (including date) instead of these numbers, which presumably mean "time since JVM started" ?

    Read the article

  • JQuery Ajax error handling, show custom exception messages

    Hey Folks, I am wondering if there is some way where I can show custom exception messages as an alert in my Jquery ajax error message. For example, say if I want to throw an exception in server side via Struts by "throw new ApplicationException("User name already exists");", I want to catch this message(User name already exists) in Jquery ajax error message. jQuery("#save").click(function(){ if(jQuery('#form').jVal()){ jQuery.ajax({ type: "POST", url: "saveuser.do", dataType:"html", data:"userId="+encodeURIComponent(trim(document.forms[0].userId.value)), success:function(response){ jQuery("#usergrid").trigger("reloadGrid"); clear(); alert("Details saved successfully!!!"); }, error:function (xhr, ajaxOptions, thrownError){ alert(xhr.status); alert(thrownError); } }); } } ); On the second alert where I alert thrown error, I am getting undefined and the status code is 500. I am not sure where I am going wrong. Please let me know on this. Thanks, Dukes

    Read the article

  • php cli script hangs with no messages

    - by julio
    Hi-- I've written a PHP script that runs via SSH and nohup, meant to process records from a database and do stuff with them (eg. process some images, update some rows). It works fine with small loads, up to maybe 10k records. I have some larger datasets that process around 40k records (not a lot, I realize, but it adds up to a lot of work when each record requires the download and processing of up to 50 images). The larger datasets can take days to process. Sometimes I'll see in my debug logs memory errors, which are clear enough-- but sometimes the script just appears to "die" or go zombie on me. My tail of the debug log just stops, with no error messages, the tail of the nohup log ends with no error, and the process is still showing in a ps list, looking like this-- 26075 pts/0 S 745:01 /usr/bin/php ./import.php but no work is getting done. Can anyone give me some ideas on why a process would just quit? The obvious things (like a php script timeout and memory issues) are not a factor, as far as I can tell. Thanks for any tips PS-- this is hosted on a godaddy VDS (not my choice). I am sort of suspecting that godaddy has some kind of limits that might kick in on me despite what overrides I put in the code (such as set_time_limit(0);).

    Read the article

  • iPhone app crashes on start-up, in stack-trace only messages from built-in frameworks

    - by Aleksejs
    My app some times crashes at start-up. In stack-trace only messages from built-in frameworks. An excerpt from a crash log: OS Version: iPhone OS 3.1.3 (7E18) Report Version: 104 Exception Type: EXC_BAD_ACCESS (SIGBUS) Exception Codes: KERN_PROTECTION_FAILURE at 0x000e6000 Crashed Thread: 0 Thread 0 Crashed: 0 CoreGraphics 0x339305d8 argb32_image_mark_RGB32 + 704 1 CoreGraphics 0x338dbcd4 argb32_image + 1640 2 libRIP.A.dylib 0x320d99f0 ripl_Mark 3 libRIP.A.dylib 0x320db3ac ripl_BltImage 4 libRIP.A.dylib 0x320cc2a0 ripc_RenderImage 5 libRIP.A.dylib 0x320d5238 ripc_DrawImage 6 CoreGraphics 0x338d7da4 CGContextDelegateDrawImage + 80 7 CoreGraphics 0x338d7d14 CGContextDrawImage + 364 8 UIKit 0x324ee68c compositeCGImageRefInRect 9 UIKit 0x324ee564 -[UIImage(UIImageDeprecated) compositeToRect:fromRect:operation:fraction:] 10 UIKit 0x32556f44 -[UINavigationBar drawBackButtonBackgroundInRect:withStyle:pressed:] 11 UIKit 0x32556b00 -[UINavigationItemButtonView drawRect:] 12 UIKit 0x324ecbc4 -[UIView(CALayerDelegate) drawLayer:inContext:] 13 QuartzCore 0x311cacfc -[CALayer drawInContext:] 14 QuartzCore 0x311cab00 backing_callback 15 QuartzCore 0x311ca388 CABackingStoreUpdate 16 QuartzCore 0x311c978c -[CALayer _display] 17 QuartzCore 0x311c941c -[CALayer display] 18 QuartzCore 0x311c9368 CALayerDisplayIfNeeded 19 QuartzCore 0x311c8848 CA::Context::commit_transaction(CA::Transaction*) 20 QuartzCore 0x311c846c CA::Transaction::commit() 21 QuartzCore 0x311c8318 +[CATransaction flush] 22 UIKit 0x324f5e94 -[UIApplication _reportAppLaunchFinished] 23 UIKit 0x324a7a80 -[UIApplication _runWithURL:sourceBundleID:] 24 UIKit 0x324f8df8 -[UIApplication handleEvent:withNewEvent:] 25 UIKit 0x324f8634 -[UIApplication sendEvent:] 26 UIKit 0x324f808c _UIApplicationHandleEvent 27 GraphicsServices 0x335067dc PurpleEventCallback 28 CoreFoundation 0x323f5524 CFRunLoopRunSpecific 29 CoreFoundation 0x323f4c18 CFRunLoopRunInMode 30 UIKit 0x324a6c00 -[UIApplication _run] 31 UIKit 0x324a5228 UIApplicationMain 32 Journaler 0x000029ac main (main.m:14) 33 Journaler 0x00002948 start + 44 File main.m is simple as possible: #import <UIKit/UIKit.h> int main(int argc, char *argv[]) { NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; int retVal = UIApplicationMain(argc, argv, nil, nil); // line 14 [pool release]; return retVal; } What my cause the app to crash?

    Read the article

  • Getting all new messages from a Maildir in python

    - by Jesper
    I have a mail dir: foo@foo:~/Maildir$ ls -l total 288 drwx------ 2 foo foo 155648 2010-04-19 15:19 cur -rw------- 1 foo foo 440 2010-03-20 08:50 dovecot.index.log -rw------- 1 foo foo 112 2010-03-20 08:49 dovecot-uidlist -rw------- 1 foo foo 8 2010-03-20 08:49 dovecot-uidvalidity -rw------- 1 foo foo 0 2010-03-20 08:49 dovecot-uidvalidity.4ba48c0e drwx------ 2 foo foo 114688 2010-04-19 16:07 new drwx------ 2 foo foo 4096 2010-04-19 16:07 tmp And in python I'm trying to get all new messages (Python 2.6.5rc2). First, getting "Maildir" works: >>> import mailbox >>> md = mailbox.Maildir('/home/foo/Maildir') >>> md.iterkeys().next() '1269924477.Vfc01I4249fM708004.foo' But how do I access "Maildir/new"? This does not work: >>> md = mailbox.Maildir('/home/foo/Maildir/new') >>> md.iterkeys().next() Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib/python2.6/mailbox.py", line 346, in iterkeys self._refresh() File "/usr/lib/python2.6/mailbox.py", line 467, in _refresh for entry in os.listdir(subdir_path): OSError: [Errno 2] No such file or directory: '/home/foo/Maildir/new/new' >>> Any ideas?

    Read the article

  • Trouble extending event log messages

    - by Matt H
    Hi. I'm trying to add some extended error codes to the event log but I get the following error. The description for Event ID ( 109 ) in Source ( PumpServer ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. You may be able to use the /AUXSOURCE= flag to retrieve this description; see Help and Support for details. The following information is part of the event: The event log file is corrupt.. The message file looks like this and I added the one on the end:- <---snip---> MessageId= SymbolicName=EVMSG_BADREQUEST Language=English The service received an unsupported request. . MessageId= SymbolicName=EVMSG_DEBUG Language=English %1 . MessageId= SymbolicName=EVMSG_STOPPED Language=English The service was stopped. . MessageId= SymbolicName=EVMSG_INVALIDLICENCE Language=English The service does not have a valid licence. Initialization failed. . It compiles fine. The mc program is running over this file and producing a header file of the same name with my new message id showing. // // MessageId: EVMSG_INVALIDLICENCE // // MessageText: // // The service does not have a valid licence. Initialization failed. // #define EVMSG_INVALIDLICENCE 0x0000006DL Any ideas why it's not finding my message? All the others work.

    Read the article

  • SOAP Messages on iPhone

    - by CocoaNewBee
    Hello everyone !! I have to use several SOAP messages to get data from a web service. I got some examples how to do that but they all have the XML (http://icodeblog.com/2008/11/03/iphone-programming-tutorial-intro-to-soap-web-services/) // ---- LOGIN ----- NSString *soapMessage = [NSString stringWithFormat: @"<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" "<soap12:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soap12=\"http://www.w3.org/2003/05/soap-envelope\">\n" "<soap12:Body>\n" "<Login xmlns=\"http://tempuri.org/\">\n" "<sUserID>USER</sUserID>\n" "<sUserPw>PASSWORD</sUserPw>\n" "<sDomain>SERVER</sDomain>\n" "</Login>\n" "</soap12:Body>\n" "</soap12:Envelope>\n" ]; NSString *urlToSend = [[NSString alloc] initWithString:@"http://SERVER/DIRECTORY/WSDL_FILE.ASMX"]; NSString *callTOMake = [[NSString alloc] initWithString:@"http://WEBSERVER/Login"]; TWO questions: 1) Does it make sense to read the SOAP Message from a class or a file into xcode?? or sould I just define them thru the code ?? 2) I used SOAPUI & .NET to query the service. It works fine... but when I do it from the iphone simulator it returns the following: 2010-03-10 15:13:54.773 Hello_SOAP[91204:207] soap:ClientServer did not recognize the value of HTTP Header SOAPAction: http://WEBSERVER/DIRECTORY/Login How can I figure out what the issue is that's causing the said error on the simulator??

    Read the article

  • Thread to receive the messages from serial port is not working using c#

    - by karthik
    I am using Serial port to receive the messages. The below function is running in a thread. When i debug i find that the thread is running properly. But "if (sp.IsOpen)" is always false, due to which the code is not executing inside the IF condition at all. It says the Port is closed. I will be having multiple serial ports in my system and i will not know, which port will receive the message. So i need to listen to all the ports in one Thread. How can i solve my problem here ? private void ListenerPorts() { log.Info("Listening Thread Started"); while (true) { //foreach (SerialPort sp in storeport) foreach (SerialPort sp in comPortsList) { if (sp.IsOpen) { sp.ReadTimeout = readTimeoutInMs; sp.WriteTimeout = writeTimeoutInMs; try { string msg = sp.ReadLine(); this.GetMessageRichTextBox("Message : " + msg + "\n"); sp.WriteLine(sp.PortName); if (msg.Contains("COM")) { // is AutoScan receiverPortName = sp.ReadLine(); this.updateLblStatusRichTextBox(sp.PortName + " is connected to " + msg + "\n"); } else { //standalone is uppercase ReceiverPortName = sp.ReadLine(); this.updateLblStatusRichTextBox(sp.PortName + " is connected to " + ReceiverPortName + "\n"); } } catch (Exception ex) { // no data System.Diagnostics.Debug.WriteLine(sp.PortName + " : " + ex.Message); } } } } }

    Read the article

  • Understanding the workflow of the messages in a generic server implementation in Erlang

    - by Chiron
    The following code is from "Programming Erlang, 2nd Edition". It is an example of how to implement a generic server in Erlang. -module(server1). -export([start/2, rpc/2]). start(Name, Mod) -> register(Name, spawn(fun() -> loop(Name, Mod, Mod:init()) end)). rpc(Name, Request) -> Name ! {self(), Request}, receive {Name, Response} -> Response end. loop(Name, Mod, State) -> receive {From, Request} -> {Response, State1} = Mod:handle(Request, State), From ! {Name, Response}, loop(Name, Mod, State1) end. -module(name_server). -export([init/0, add/2, find/1, handle/2]). -import(server1, [rpc/2]). %% client routines add(Name, Place) -> rpc(name_server, {add, Name, Place}). find(Name) -> rpc(name_server, {find, Name}). %% callback routines init() -> dict:new(). handle({add, Name, Place}, Dict) -> {ok, dict:store(Name, Place, Dict)}; handle({find, Name}, Dict) -> {dict:find(Name, Dict), Dict}. server1:start(name_server, name_server). name_server:add(joe, "at home"). name_server:find(joe). I tried so hard to understand the workflow of the messages. Would you please help me to understand the workflow of this server implementation during the executing of the functions: server1:start, name_server:add and name_server:find?

    Read the article

  • How do I send floats in window messages.

    - by yngvedh
    Hi, What is the best way to send a float in a windows message using c++ casting operators? The reason I ask is that the approach which first occurred to me did not work. For the record I'm using the standard win32 function to send messages: PostWindowMessage(UINT nMsg, WPARAM wParam, LPARAM lParam) What does not work: Using static_cast<WPARAM>() does not work since WPARAM is typedef'ed to UINT_PTR and will do a numeric conversion from float to int, effectively truncating the value of the float. Using reinterpret_cast<WPARAM>() does not work since it is meant for use with pointers and fails with a compilation error. I can think of two workarounds at the moment: Using reinterpret_cast in conjunction with the address of operator: float f = 42.0f; ::PostWindowMessage(WM_SOME_MESSAGE, *reinterpret_cast<WPARAM*>(&f), 0); Using an union: union { WPARAM wParam, float f }; f = 42.0f; ::PostWindowMessage(WM_SOME_MESSAGE, wParam, 0); Which of these are preffered? Are there any other more elegant way of accomplishing this?

    Read the article

  • Ideas for storing e-mail messages in a Delphi client server application

    - by user193655
    There are many suggestions here and there for storing e-mail messages. Somehow what I am doing is writing an Outlook addin to send emails from inbox/sent folders directly to my application. So only what is really interesting is saved. And I decide where to save it. Imagine this case: I recieve an email from a customer. It's up to me to decide whether I should save it on the customer or on the order 24 that that customer did. So this is why I am doing the add in, and not some automatic storing of emails = noise after some time. This said, how to store the emails? For the emails that I recieve or send through Outlook the idea could be save the whole file in a blob field (so the eml file), may be I can save also other info (like the subject) in another text field. But the problem comes when I write an email from my application. In this case I am not generating an eml file, I send through MAPI data to Outlook to compose an email that I will send with Outlook (so in this case I cannot save the eml), or I directly send it with Indy. Also in this case I don't have the eml file... One idea could be that the all the emails that I auto compose have a special flag that the Add in recognises and therefore when I send the mail it is stored back to the DB. So in this case I can save the eml also of the mails I sent from my application. May you comment?

    Read the article

  • jQuery validation plugin - no error messages instead custom backgrounds

    - by Skoota
    I am using the jQuery validation plugin. The form which is being validated has custom background images for the text input fields, so instead of showing an error message for invalid fields I would like to change the background image. Making things a bit trickier is that the background image for the fields is on a different div absolutely positioned behind the text field (which has a transparent background and no border). I will spare going into the reasons for this design decision here (it's related to margins within the text field) but I thought it should be mentioned since it is critical to this question. Therefore, I have two questions: How can I stop the display of the error messages all-together? How can I instead tell the validation plugin if, for example, the name field (e.g. <input id=name ... />) is invalid then it should change the background for the relevant div (e.g. <div id=name-bg... ></div>)? Thanks for any assistance!

    Read the article

  • Clicking mouse by sending messages

    - by Frank Meulenaar
    I'm trying to send mouse clicks to a program. As I don't want the mouse to move, I don't want to use SendInput or mouse_event, and because the window that should receive the clicks doesn't really use Buttons or other GUI events, I can't send messages to these buttons. I'm trying to get this working using SendMessage, but for some reason it doesn't work. Relevant code is (in C#, but tried Java with jnative as well), trying this on Vista [DllImport("user32.dll", CharSet=CharSet.Auto)] public static extern int SendMessage(IntPtr A_0, int A_1, int A_2, int A_3); static int WM_CLOSE = 0x10; static int WM_LBUTTONDOWN = 0x201; static int WM_LBUTTONUP = 0x202; public static void click(IntPtr hWnd, int x, int y) { SendMessage(hWnd, WM_LBUTTONDOWN, 1, ((x << 0x10) ^ y)); SendMessage(hWnd, WM_LBUTTONUP, 0, ((x << 0x10) ^ y)); } public static void close(IntPtr hWnd) { SendMessage(hWnd, WM_CLOSE, 0, 0); } The close works fine, but the click doesn't do anything.

    Read the article

  • Android Service Testing with messages

    - by Sandeep Dhull
    I have a service which does its work(perform network operation) depending upon the type of message(message.what) property of the message. Then it returns the resoponse, also as a message to the requesting component(depending upon the message.replyTo). So, i am trying to write the testcases.. But how????? My Architecture of service is like this: 1) A component(ex. Activity) bounds to the service. 2) The component sends message to the Service(using Messenger). 3) The service has a nested class that handles the messages and execute the network call and returns a response as message to the sender(who initially sent the message and using its replyTo property). Now to test this.. i am using Junit test cases.. So , in that .. 1) in setUp() i am binding to the service.. 2) on testBusinessLogic() . i am sending the message to the service .. Now problem is where to get the response message.

    Read the article

  • How to control messages to the same port from different emitters?

    - by Alex In Paris
    Scene: A company has many factories X, each emits a message to the same receive port in a Biztalk server Y; if all messages are processed without much delay, each will trigger an outgoing message to another system Z. Problem: Sometimes a factory loses its connection for a half-day or more and, when the connection is reestablished, thousands of messages get emitted. Now, the messages still get processed well by Y (Biztalk can easily handle the load) but system Z can't handle the flood and may lock up and severely delay the processing of all other messages from the other X. What is the solution? Creating multiple receive locations that permits us to pause one X or another would lose us information if the factory isn't smart enough to know whether the message was received or not. What is the basic pattern to apply in Biztalk for this problem? Would some throttling parameters help to limit the flow from any one X? Or are their techniques on the end part of Y which I should use instead ? I would prefer this last one since I can be confident that the message box will remember any failures, which could then be resumed.

    Read the article

  • Socket server with multiple clients, sending messages to many clients without hurting liveliness

    - by Karl Johanson
    I have a small socket server, and I need to distribute various messages from client-to-client depending on different conditionals. However I think I have a small problem with livelyness in my current code, and is there anything wrong in my approach: public class CuClient extends Thread { Socket socket = null; ObjectOutputStream out; ObjectInputStream in; CuGroup group; public CuClient(Socket s, CuGroup g) { this.socket = s; this.group = g; out = new ObjectOutputStream(this.socket.getOutputStream()); out.flush(); in = new ObjectInputStream(this.socket.getInputStream()); } @Override public void run() { String cmd = ""; try { while (!cmd.equals("client shutdown")) { cmd = (String) in.readObject(); this.group.broadcastToGroup(this, cmd); } out.close(); in.close(); socket.close(); } catch (Exception e) { System.out.println(this.getName()); e.printStackTrace(); } } public void sendToClient(String msg) { try { this.out.writeObject(msg); this.out.flush(); } catch (IOException ex) { } } And my CuGroup: public class CuGroup { private Vector<CuClient> clients = new Vector<CuClient>(); public void addClient(CuClient c) { this.clients.add(c); } void broadcastToGroup(CuClient clientName, String cmd) { Iterator it = this.clients.iterator(); while (it.hasNext()) { CuClient cu = (CuClient)it.next(); cu.sendToClient(cmd); } } } And my main-class: public class SmallServer { public static final Vector<CuClient> clients = new Vector<CuClient>(10); public static boolean serverRunning = true; private ServerSocket serverSocket; private CuGroup group = new CuGroup(); public void body() { try { this.serverSocket = new ServerSocket(1337, 20); System.out.println("Waiting for clients\n"); do { Socket s = this.serverSocket.accept(); CuClient t = new CuClient(s,group); System.out.println("SERVER: " + s.getInetAddress() + " is connected!\n"); t.start(); } while (this.serverRunning); } catch (IOException ex) { ex.printStackTrace(); } } public static void main(String[] args) { System.out.println("Server"); SmallServer server = new SmallServer(); server.body(); } } Consider the example with many more groups, maybe a Collection of groups. If they all synchronize on a single Object, I don't think my server will be very fast. I there a pattern or something that can help my liveliness?

    Read the article

  • How to implement a bidirectional "mailbox service" over tcp?

    - by igorgatis
    The idea is to allow to peer processes to exchange messages (packets) over tcp as much asynchronously as possible. The way I'd like it to work is each process to have an outbox and an inbox. The send operation is just a push on the outbox. The receive operation is just a pop on the inbox. Underlying protocol would take care of the communication details. Is there a way to implement such mechanism using a single TCP connection? How would that be implemented using BSD sockets and modern OO Socket APIs (like Java or C# socket API)?

    Read the article

  • MFC resource.h command/message IDs

    - by ak
    Hi I'm working on an MFC application, that got pretty messy over years and over different teams of developers. The resource.h file, which contains all command/message mappings grew pretty big over time, and has lots of problems (like duplicate IDs). I am not proficient with MFC, so the question might sound pretty stupid... MSDN docs mention that Command IDs and Message IDs should not be less than WM_USER and WM_APP correspondingly. I saw that most of the command IDs in resource.h generated by Visual Studio begin around 100. Shouldn't this cause some interfering with MFC/Windows commands and messages, that overlap with the application defined IDs? For example, I have a command ID : #define ID_MY_ID 101 and there is a windows command that has the same ID. When MC send this command to the APP, it's handled like an application defined ID_MY_ID, and the app is taking unnecessary actions. Is it a possible scenario? Also, is there some third party tool that helps to profile the project resources?

    Read the article

< Previous Page | 17 18 19 20 21 22 23 24 25 26 27 28  | Next Page >