Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed HTTPConnection to include option for using a call back method to set httpResponse #103

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

zurbergram
Copy link

Changed HTTPConnection
Added property useCallBack, default value of false
Added method useCallBack
Added method setUseCallBack:
Changed method httpResponseForMethod:URI:
Added method httpResponseForMethodStart:URI:
Added method httpResponseForMethodFinished:URI:

This change if useCallBack is set to true allows the server to wait to send the response until the app server would like the response sent. This allows for multithreaded work to be done from the app server before letting the client know the results.

Example:

A PC (client) ask the iOS device(app server) on same wifi network to start up a process and needs to know if the process was successful or not. The process on the app server requires the app server to make a call to another server(data server) to get data. When the app server makes a connection to the data server it creates another thread.

The original design would send the response before the app server's connection to the data server was finished doing it's work. The new design allows the app server to send a response based on what on interaction with the data server.

Changed HTTPConnection
	Changed method httpResponseForMethod:URI:
	Added method httpResponseForMethodFinished:URI:

This change forces the server to wait to send the response until the
app server would like the response sent.  This allows for multithreaded
work to be done from the app server before letting client know results.

Example:

A PC (client) ask the iOS device(app server) on same wifi network to
start up a process and needs to know if the process was successful or
not.  The process on the app server requires the app server to make a
call to another server(data server) to get data. When the app server
makes a connection to the data server it creates another thread.

The original design would send the response before the app server's
connection to the data server was finished doing it's work.  The new
design allows the app server to send a response based on what on
interaction with the data server.
Changed HTTPConnection
	Added property useCallBack, default value of false
	Added method useCallBack
	Added method setUseCallBack:
	Changed method httpResponseForMethod:URI:
	Added method httpResponseForMethodStart:URI:
	Added method httpResponseForMethodFinished:URI:

This change if useCallBack is set to true allows the server to wait to
send the response until the app server would like the response sent.
This allows for multithreaded work to be done from the app server
before letting client know results.

Example:

A PC (client) ask the iOS device(app server) on same wifi network to
start up a process and needs to know if the process was successful or
not.  The process on the app server requires the app server to make a
call to another server(data server) to get data. When the app server
makes a connection to the data server it creates another thread.

The original design would send the response before the app server's
connection to the data server was finished doing it's work.  The new
design allows the app server to send a response based on what on
interaction with the data server.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant