You are on page 1of 4

IFTTT And Socket

Programming
IFTTT Sockets
If This Then That- is an web based cloud application that lets Sockets allow communication between two processes or
you create connection between other web services and web applications on the same or different machines. It is
applications. used in a client server application framework.
No coding is needed. Based on the concept of creating Sockets allow network programming and Can be
“recipes”. “this”=trigger and “that”=action. programmed in different languages such as Python,
As an end-user this means that writing logic with the IFTTT C,C++, and Java.
platform is simply a case of clicking a few icons to select some
pre-defined Recipes and filling in trigger/actions.
Different applications such as GMAIL, Dropbox, Facebook, Application level protocols such as FTP, POP3, HTTP,
Pininterest etc. can interact to each other via IFTTT that make use of sockets for exchange of data between client
connects to the service API. IFTTT defines its own concise and server. The type of data that can be exchanged are
protocol which your service’s API will implement. messages, text files, images, and JSON.

IFTTT is implemented in the form of Software As A Service Sockets are implemented on network protocols. Allows
paradigm. peer to peer connection using port numbers and IP
addresses.
Sockets: Server RPi
import socket
s=socket.socket()
host=‘192.168.10.1’ # IP address of the server
port=62345 #choose any port between 0 to 65535
s.bind((host,port))
while True:
c,addr=s.accept()
print(‘Got connection from’, addr)
c.send(‘Thanks for connecting’)
c.close()
Sockets: Client RPi
import socket
s=socket.socket()
host=‘192.168.10.1’ # ip address of server RPi
port=62345
s.connect((host,port))
print(S.recv(1024))
s.close()

You might also like