Search Results

Search found 3276 results on 132 pages for 'protocol'.

Page 7/132 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • NSNotifications vs delegate for multiple instances of same protocol

    - by Brent Traut
    I could use some architectural advice. I've run into the following problem a few times now and I've never found a truly elegant way to solve it. The issue, described at the highest level possible:I have a parent class that would like to act as the delegate for multiple children (all using the same protocol), but when the children call methods on the parent, the parent no longer knows which child is making the call. I would like to use loose coupling (delegates/protocols or notifications) rather than direct calls. I don't need multiple handlers, so notifications seem like they might be overkill. To illustrate the problem, let me try a super-simplified example: I start with a parent view controller (and corresponding view). I create three child views and insert each of them into the parent view. I would like the parent view controller to be notified whenever the user touches one of the children. There are a few options to notify the parent: Define a protocol. The parent implements the protocol and sets itself as the delegate to each of the children. When the user touches a child view, its view controller calls its delegate (the parent). In this case, the parent is notified that a view is touched, but it doesn't know which one. Not good enough. Same as #1, but define the methods in the protocol to also pass some sort of identifier. When the child tells its delegate that it was touched, it also passes a pointer to itself. This way, the parent know exactly which view was touched. It just seems really strange for an object to pass a reference to itself. Use NSNotifications. The parent defines a separate method for each of the three children and then subscribes to the "viewWasTouched" notification for each of the three children as the notification sender. The children don't need to attach themselves to the user dictionary, but they do need to send the notification with a pointer to themselves as the scope. Same as #4, but rather than using separate methods, the parent could just use one with a switch case or other branching along with the notification's sender to determine which path to take. Create multiple man-in-the-middle classes that act as the delegates to the child views and then call methods on the parent either with a pointer to the child or with some other differentiating factor. This approach doesn't seem scalable. Are any of these approaches considered best practice? I can't say for sure, but it feels like I'm missing something more obvious/elegant.

    Read the article

  • Objective C: Class Extensions and Protocol Conformation Warnings

    - by Ben Reeves
    I have a large class, which I have divided into several different class extension files for readability. @protocol MyProtocol @required -(void)required; @end @interface MyClass : NSObject <MyProtocol> @end @interface MyClass (RequiredExtension) -(void)required; @end Is there a better way to do this, without the compiler warning? warning: class 'MyClass' does not fully implement the 'MyProtocol' protocol

    Read the article

  • Forcing a particular SSL protocol for an nginx proxying server

    - by vitch
    I am developing an application against a remote https web service. While developing I need to proxy requests from my local development server (running nginx on ubuntu) to the remote https web server. Here is the relevant nginx config: server { server_name project.dev; listen 443; ssl on; ssl_certificate /etc/nginx/ssl/server.crt; ssl_certificate_key /etc/nginx/ssl/server.key; location / { proxy_pass https://remote.server.com; proxy_set_header Host remote.server.com; proxy_redirect off; } } The problem is that the remote HTTPS server can only accept connections over SSLv3 as can be seen from the following openssl calls. Not working: $ openssl s_client -connect remote.server.com:443 CONNECTED(00000003) 139849073899168:error:140790E5:SSL routines:SSL23_WRITE:ssl handshake failure:s23_lib.c:177: --- no peer certificate available --- No client certificate CA names sent --- SSL handshake has read 0 bytes and written 226 bytes --- New, (NONE), Cipher is (NONE) Secure Renegotiation IS NOT supported Compression: NONE Expansion: NONE --- Working: $ openssl s_client -connect remote.server.com:443 -ssl3 CONNECTED(00000003) <snip> --- SSL handshake has read 1562 bytes and written 359 bytes --- New, TLSv1/SSLv3, Cipher is RC4-SHA Server public key is 1024 bit Secure Renegotiation IS NOT supported Compression: NONE Expansion: NONE SSL-Session: Protocol : SSLv3 Cipher : RC4-SHA <snip> With the current setup my nginx proxy gives a 502 Bad Gateway when I connect to it in a browser. Enabling debug in the error log I can see the message: [info] 1451#0: *16 peer closed connection in SSL handshake while SSL handshaking to upstream. I tried adding ssl_protocols SSLv3; to the nginx configuration but that didn't help. Does anyone know how I can set this up to work correctly?

    Read the article

  • Protocol (or service publish/discovery) to detect devices in network

    - by Gobliins
    we connect some embedded devices in a network. What i am looking for now, is a way to find the devices IP and identify them. We work with Windows PC´s and i am about to write a C# tool that should do this. I thought about send a udp broadcast and in the ack i.e. is the device´s ip, which would mean the device needs a daemon runnig to assign an ip itself. Running a service (like a printer) on the device, and on the PC just lookup for the service. I read about some things like apipa, zeroconf, ipv4 local link, bonjour, dns-sd, mdns, bonjour; They can automatically assign ip´s and publish services in a network. My Question is, can someone recommend me what would be good for my task? -The protocol or Service should be low on ressource (memory/cpu usage) use. -Are there some standard protocolls to use? -Is DNS a good idea or would it be to ressource consumpting just for finding a device´s IP? -Should also work when no dhcp servers are around. edit: To clarify a bit: The IP configuration is automatic. The problem to focus is how to tell the PC which IP in the network (or a direct connection in this vase there would only be one) belongs to the device (identity).

    Read the article

  • Secure filesharing protocol for fileserver

    - by Hugo
    I'm setting up a fileserver, and I want lots of clients to easily access it. Up to now I've always used SSHFS to share between different PCs, but since I'm setting up a single fileserver, I'm looking for other common alternatives. Up to now I've seen: AFS: It seems it has no security, traffic is unencrypted, so it would require an SSH tunnel. If I'm to use SSH, I'd just use SSHFS. NFS: Same as above. Also, setting up the server is not so straighforward, it doesn't seem to be KISS enough - at least not for my liking. SMB: Same as AFS. It also seems not to be too well documented, and technically, seems a bit poor. It also seems the protocol isn't formally standardized. SSHFS has security, but as a downside, requieres every user to have an account on the server - there's no way to make a certain directory PUBLIC either. I don't think it has locking, and isn't very fault-tolerant. Are there any alternatives I've missing?

    Read the article

  • How to use HTTP Live Streaming protocol in iPhone SDk 3.0

    - by Pugal Devan
    Hi Guys, i have developed on IPhone application and submitted to App store. But my application got rejected based on below criteria. Thank you for submitting your yyyyyyyy application. We have reviewed your application and have determined that it cannot be posted to the App Store at this time because it is not using the HTTP Live Streaming protocol to broadcast streaming video. HTTP Live Streaming is required when streaming video feeds over the cellular network, in order to have an optimal user experience and utilize cellular best practices. This protocol automatically determines bandwidth available to users and adjusts the bandwidth appropriately, even as bandwidth streams change. This allows you the flexibility to have as many streams as you like, as long as 64 kbps is set as the baseline feed. In my apps i have to stream prerecorded m4v and mp3 files from my server. I used MPMoviePlayerController to stream and play those videos / audio. How to implement the HTTP Live Streaming Protocol in my apps? Also can i get some sample code? Thanks in advance!

    Read the article

  • How to implement a network protocol?

    - by gotch4
    Here is a generic question. I'm not in search of the best answer, I'd just like you to express your favourite practices. I want to implement a network protocol in Java (but this is a rather general question, I faced the same issues in C++), this is not the first time, as I have done this before. But I think I am missing a good way to implement it. In fact usually it's all about exchanging text messages and some byte buffers between hosts, storing the status and wait until the next message comes. The problem is that I usually end up with a bunch of switch and more or less complex if statements that react to different statuses / messages. The whole thing usually gets complicated and hard to mantain. Not to mention that sometimes what comes out has some "blind spot", I mean statuses of the protocol that have not been covered and that behave in a unpredictable way. I tried to write down some state machine classes, that take care of checking start and end statuses for each action in more or less smart ways. This makes programming the protocol very complicated as I have to write lines and lines of code to cover every possible situation. What I'd like is something like a good pattern, or a best practice that is used in programming complex protocols, easy to mantain and to extend and very readable. What are your suggestions?

    Read the article

  • WIF using SAML 2 protocol / Federate AD FS 2.0 with CAS

    - by spa
    I'am are trying to implement a Web SSO with claim based identity using WIF and AD FS 2.0 right now. Right now I have a existing ASP.Net application which delegates authentification to the AD FS 2.0 server and trust issued security tokens. That works just fine. However, in the organization there is an existing JA-SIG Central Authentication Service (CAS) server which supports the SAML 2 protocol. I would like to replace AD FS 2.0 with the existing CAS service. In my understanding WIF uses WS-Federation, which is like a container around a SAML token. Is it possible to use the plain SAML 2 protocol and it's bindings (redirect or POST)? If that is not possible (as I guess), a second alternative might be to use federate identity and federate AD FS 2.0 with CAS. Is that possible? There is little to no information about that on the web. Thanks :-)

    Read the article

  • Error setting up thrift modules for python

    - by MMRUser
    Hi, I'm trying to set up thrift in order to incorporate with Cassandra, so when I ran the setup.py it out puts this message in command line running build running build_py running build_ext building 'thrift.protocol.fastbinary' extension C:\MinGW\bin\gcc.exe -mno-cygwin -mdll -O -Wall -IC:\Python26\include -IC:\Pytho n26\PC -c src/protocol/fastbinary.c -o build\temp.win32-2.6\Release\src\protocol \fastbinary.o src/protocol/fastbinary.c:24:24: netinet/in.h: No such file or directory src/protocol/fastbinary.c:85:4: #error "Cannot determine endianness" src/protocol/fastbinary.c: In function `writeI16': src/protocol/fastbinary.c:295: warning: implicit declaration of function `htons' src/protocol/fastbinary.c: In function `writeI32': src/protocol/fastbinary.c:300: warning: implicit declaration of function `htonl' src/protocol/fastbinary.c: In function `readI16': src/protocol/fastbinary.c:688: warning: implicit declaration of function `ntohs' src/protocol/fastbinary.c: In function `readI32': src/protocol/fastbinary.c:696: warning: implicit declaration of function `ntohl' error: command 'gcc' failed with exit status 1 Need some helping on this issue.I have already install the MigW32 Thanks.

    Read the article

  • Implement 3270 protocol in Java

    - by G B
    I've got a big problem with IBM HACL for accessing a server which speaks 3270 protocol. The library keeps crashing, and our JNI wrapper is actually a bug-fixing layer for the poorly-implemented and poorly-documented library (and I suspect we have introduced new bugs with it too). Moreover, in our company, everybody knows Java, and could maintain the software if we didn't have the JNI-Layer and the IBM class library. We have to use the C++ class library, because the IBM Java library is unusable: we get every non-printable character translated, and we lose all control characters along the way. Now the question is: can we ditch this library and implement our solution in Java completely (we'd like to avoid using another library from another vendor)? Is the protocol well documented? Is the implementation of 3270-over-ssl really so complex? Thanks.

    Read the article

  • Custom URL protocol in Windows to serve HTML content

    - by Jen
    This question addresses how to register a custom URL protocol to launch an application in response to a link, but I want my handler to serve dynamic content. Essentially, I'm looking to create a web application that runs on the user's machine instead of a web server. I could set up a localhost, but I want to use a "friendly" URL format that the user can reference elsewhere, e.g. a hypothetical cats protocol: cats:fluffy/cheeseburger-consumption-stats How can I accomplish this? Also, do you see any pitfalls with this approach, such as security warnings from browsers? Thanks!

    Read the article

  • VLC helper protocol on Mac OS X

    - by Preben
    Hey everybody, I am trying to add a vlc:// helper protocol on Mac OS X. To register the protocol, I have unsuccessfully been playing around with the MoreInternet PrefPane. What I want to have in my browser is a vlc://someressource.com/audio.mp3, which should launch VLC and add http://someressource.com/audio.mp3 to the playlist (this works fine on Windows and also Linux if I remember correctly). Maybe even just have vlc://http:// so that https would also be supported. I have no idea how to achieve this. I tried making a bash script, which MoreInternet would not accept. Then I tried making an application through Automator with my Bash script embedded. That did not work either, as the Automator application has no "creator code" - whatever that is?! Can any of you guys point me in the right direction? Thanks in advance!

    Read the article

  • Developing a project which is an implementation of an open standard/protocol

    - by dotnetdev
    Hi, A lot of interesting code/projects are implementations of protocols, eg SNMP. How are projects like these, which depend on implementing a certain format, developed? Is the process something like get the guidelines of the protocol and then implement code which follows it. For example, XML-RPC is about transmitting XML docs between client/server, so the documentation on this protocol must outline the structure of the XML documents and then the way the transportation between client and server works, so the coder will implement this sort of functionality (xml doc construction, networking between the client and server). Projects I am thinking of (not to develop) are C# libraries which can interpret .PSDs, make VHDs, etc. So if I was to develop a C# app to implement .AI files (Illustrator files), what would be the steps I would look at (such as contacting Adobe, etc)? Is this the way such projects are developed?

    Read the article

  • PHP getting full server name including port number and protocol

    - by vivid-colours
    In PHP, is there a reliable and good way of getting these things: Protocol: i.e. http or https Servername: e.g. localhost Portnumber: e.g. 8080 I can get the server name using $_SERVER['SERVER_NAME']. I can kind of get the protocol but I don't think it's perfect: if(strtolower(substr($_SERVER["SERVER_PROTOCOL"],0,5))=='https') { return "https"; } else { return "http"; } I don't know how to get the port number though. The port numbers I am using are not 80.. they are 8080 and 8888. Thank you.

    Read the article

  • Protocol/Packet Design Questions

    - by cam
    I'm looking to a design a protocol for a client-server application and need some links to some resources that may help me. The big part is I'm trying to create my own "packet" format so I can minimize the amount of information being sent. I'm looking for some resources to dissect their protocol, but it seems some completely lack packet design, such as SMTP (which just sends strings terminated by CLRF). What are the advantages/disadvantages of using a system like SMTP over a system that uses a custom made packet? Couldn't SMTP use only a couple bytes to cover all commands through bit flags and save bandwidth/space? Just trying to get my head around all this.

    Read the article

  • Not found in protocol

    - by Alex
    I've subclassed MKAnnotation so that i can assign objects to annotations and then assign this object to a view controller like so: - (void)mapView:(MKMapView *)mapView annotationView:(MKAnnotationView *)view calloutAccessoryControlTapped:(UIControl *)control { PlaceDetailView *detailView = [[PlaceDetailView alloc] initWithStyle:UITableViewStyleGrouped]; detailView.place = [view.annotation place]; [self.navigationController pushViewController:detailView animated:YES]; [detailView release]; } This is working great but i'm having the following issues: If i try and access the place getter method like so view.annotation.place i recieve an error: Accessing unknown place getter method If i acces the place getter method like so [view.annotation place] i receive a warning: place not found in protocol From my understanding this is because the place object is not defined in the MKAnnotation protocol, although i'm aware of this i'm not sure how to tell the complier that place does exist and it's not calling it blind.

    Read the article

  • Make my website dynamically loaded data available to Facebook Open Graph Object Scrapper

    - by fvaliquette
    Here is the design of my web site: The user enter myWebsite.com/a/1 .htaccess rules redirect to myWebsite.com/b Now the JavaScript ExtJS library is loading. Extracting the value from the URL (in this case it is “1”) Loading ./xml/1.xml From 1.xml setting the Open Graph data (Title, type, image, etc) Loading data that will be shown to the user from 1.xml into the website. My question is: How can I make the Open Graph data available to Facebook? Facebook do not to load my ExtJS JavaScript Library before extracting the Open Graph Object values from the HTML. Is there an easy solution to this problem? The only solutions I found is to make statics web pages or dynamically pages rendered on the server side but I would like to avoid these since my web page implementation is already finished and I would like to avoid re working on it.

    Read the article

  • Fixed Sized Buffer or Variable Buffers with C# Sockets

    - by Keagan Ladds
    I am busy designing a TCP Server class in C# that has events and allows the user of the class to define packets that the server can send a receive by registering a class that is derived from my "GenericPacket" class. My TCPListener uses Async methods such as .BeginReceive(..); My issue is that because I am using the .BeginReceive(); I need to specify a buffer size when I call the function. This means I cant read the whole packet if one of my defined packets is too big. I have thought of creating a fixed sized Header that gets read using .BeginRead(); and the read the rest using Stream.Read(); but this will lead to the whole server having to wait for this operation to complete. I would like to know if anyone has come across this before and I would appreciate any suggestions.

    Read the article

  • Why Is it better to use unreadable bytes for client server communication?

    - by Alessa
    I'm composing communication lyrics for client-server and what am I thinking about: "authme username passord" (maybe encrytped) "accept" "get archive of H2O from 03.02.2005 to 20.12.2064" transferring binary structure or "error descrtiption" why I always need to do something like 0x0FA52FD + CRC 0x0D34423 + CRC ... I can see some secure reasons but I think it's not the real reason so why I can't use strings in client-server communication?

    Read the article

  • Legal responsibility of public posts

    - by Murdock
    Given a public site with no logins: I let people post links to public Facebook profiles, and my site fetches the profile picture and displays it. Would it be ok if I just told people to post profiles of which they had the owner’s permission? Does such a statement exonerate me from copyright infringements and place the burden on the user? Edit: For bonus points. Can the statement just be a notice under the button (that will save the link) that says that "By clicking this button you agree to the terms and conditions" with maybe a link to the terms and conditions.

    Read the article

  • Objective-C protocol vs inheritance vs extending?

    - by ryanjm.mp
    I have a couple classes that have nearly identical code. Only a string or two is different between them. What I would like to do is to make them "x" from another class that defines those functions and then uses constants or something else to define those strings that are different. I'm not sure if "x" is inheritance or extending or what. That is what I need help with. For example: objectA.m: -(void)helloWorld { NSLog("Hello %@",child.name); } objectBob.m: #define name @"Bob" objectJoe.m #define name @"Joe" (I'm not sure if it's legal to define strings, but this gets the point across) It would be ideal if objectBob.m and objectJoe.m didn't have to even define the methods, just their relationship to objectA.m. Is there any way to do something like this? It is kind of like protocol, except in reverse, I want the "protocol" to actually define the functions. If all else fails I'll just make objectA.m: -(void)helloWorld:(NSString *name) { NSLog("Hello %@",name); } And have the other files call that function (and just #import objectA.m).

    Read the article

  • Dovecot: no auth attempts in 0 secs (IMAP protocol)

    - by Luca D'Amico
    I'm having a lot of problems configuring dovecot ony vps. I'm already able to send email using port 110 and to receive email using port 25, but I can't connect using port 993 and 995. I'm using self-signed ssl certificates. When I try to connect to 993 this error is logged: Jun 8 19:06:39 MY_HOSTNAME dovecot: imap-login: Disconnected (no auth attempts in 2 secs): user=<>, rip=MY_IP, lip=MY_VPS_IP, TLS, session=<MY_SESSION> When I try to connect to 995 here is the error log: Jun 8 19:08:17 MY_HOSTNAME dovecot: pop3-login: Disconnected (no auth attempts in 0 secs): user=<>, rip=MY_IP, lip=MY_VPS_IP, TLS: SSL_read() failed: error:14094416:SSL routines:SSL3_READ_BYTES:sslv3 alert certificate unknown: SSL alert number 46, session=<MY_SESSION> EDIT: I was able to fix this part by refreshing my mail client ssl cert. Anybody can help me please ? I'm stuck :/ Many thanks

    Read the article

< Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >