Move functionality into ndn_SocketTransport base class.
diff --git a/Makefile.in b/Makefile.in
index fad2be9..634aa7c 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -146,8 +146,7 @@
 	ndn-cpp/c/encoding/BinaryXMLName.$(OBJEXT) \
 	ndn-cpp/c/encoding/BinaryXMLPublisherPublicKeyDigest.$(OBJEXT) \
 	ndn-cpp/c/encoding/BinaryXMLStructureDecoder.$(OBJEXT) \
-	ndn-cpp/c/transport/TcpTransport.$(OBJEXT) \
-	ndn-cpp/c/transport/UdpTransport.$(OBJEXT) \
+	ndn-cpp/c/transport/SocketTransport.$(OBJEXT) \
 	ndn-cpp/c/util/DynamicUCharArray.$(OBJEXT) \
 	ndn-cpp/c/util/ndn_memory.$(OBJEXT) \
 	ndn-cpp/c/util/ndn_realloc.$(OBJEXT)
@@ -434,8 +433,9 @@
   ndn-cpp/c/encoding/BinaryXMLName.c ndn-cpp/c/encoding/BinaryXMLName.h \
   ndn-cpp/c/encoding/BinaryXMLPublisherPublicKeyDigest.c ndn-cpp/c/encoding/BinaryXMLPublisherPublicKeyDigest.h \
   ndn-cpp/c/encoding/BinaryXMLStructureDecoder.c ndn-cpp/c/encoding/BinaryXMLStructureDecoder.h \
-  ndn-cpp/c/transport/TcpTransport.c ndn-cpp/c/transport/TcpTransport.h \
-  ndn-cpp/c/transport/UdpTransport.c ndn-cpp/c/transport/UdpTransport.h \
+  ndn-cpp/c/transport/SocketTransport.c ndn-cpp/c/transport/SocketTransport.h \
+  ndn-cpp/c/transport/TcpTransport.h \
+  ndn-cpp/c/transport/UdpTransport.h \
   ndn-cpp/c/util/DynamicUCharArray.c ndn-cpp/c/util/DynamicUCharArray.h \
   ndn-cpp/c/util/ndn_memory.c ndn-cpp/c/util/ndn_memory.h \
   ndn-cpp/c/util/ndn_realloc.c ndn-cpp/c/util/ndn_realloc.h
@@ -456,9 +456,9 @@
   ndn-cpp/c/encoding/BinaryXMLStructureDecoder.h ndn-cpp/encoding/BinaryXMLStructureDecoder.hpp \
   ndn-cpp/encoding/BinaryXMLWireFormat.cpp ndn-cpp/c/encoding/BinaryXMLName.h ndn-cpp/encoding/BinaryXMLWireFormat.hpp \
   ndn-cpp/encoding/WireFormat.cpp ndn-cpp/encoding/WireFormat.hpp \
-  ndn-cpp/c/transport/TcpTransport.h ndn-cpp/transport/TcpTransport.cpp ndn-cpp/transport/TcpTransport.hpp \
+  ndn-cpp/c/transport/SocketTransport.h ndn-cpp/c/transport/TcpTransport.h ndn-cpp/transport/TcpTransport.cpp ndn-cpp/transport/TcpTransport.hpp \
   ndn-cpp/transport/Transport.cpp ndn-cpp/transport/Transport.hpp \
-  ndn-cpp/c/transport/UdpTransport.h ndn-cpp/transport/UdpTransport.cpp ndn-cpp/transport/UdpTransport.hpp
+  ndn-cpp/c/transport/SocketTransport.h ndn-cpp/c/transport/UdpTransport.h ndn-cpp/transport/UdpTransport.cpp ndn-cpp/transport/UdpTransport.hpp
 
 bin_test_encode_decode_Interest_SOURCES = tests/test-encode-decode-Interest.cpp
 bin_test_encode_decode_Interest_LDADD = libndn-c.a libndn-cpp.a
@@ -600,10 +600,7 @@
 ndn-cpp/c/transport/$(DEPDIR)/$(am__dirstamp):
 	@$(MKDIR_P) ndn-cpp/c/transport/$(DEPDIR)
 	@: > ndn-cpp/c/transport/$(DEPDIR)/$(am__dirstamp)
-ndn-cpp/c/transport/TcpTransport.$(OBJEXT):  \
-	ndn-cpp/c/transport/$(am__dirstamp) \
-	ndn-cpp/c/transport/$(DEPDIR)/$(am__dirstamp)
-ndn-cpp/c/transport/UdpTransport.$(OBJEXT):  \
+ndn-cpp/c/transport/SocketTransport.$(OBJEXT):  \
 	ndn-cpp/c/transport/$(am__dirstamp) \
 	ndn-cpp/c/transport/$(DEPDIR)/$(am__dirstamp)
 ndn-cpp/c/util/$(am__dirstamp):
@@ -774,8 +771,7 @@
 @AMDEP_TRUE@@am__include@ @am__quote@ndn-cpp/c/encoding/$(DEPDIR)/BinaryXMLName.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@ndn-cpp/c/encoding/$(DEPDIR)/BinaryXMLPublisherPublicKeyDigest.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@ndn-cpp/c/encoding/$(DEPDIR)/BinaryXMLStructureDecoder.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@ndn-cpp/c/transport/$(DEPDIR)/TcpTransport.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@ndn-cpp/c/transport/$(DEPDIR)/UdpTransport.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@ndn-cpp/c/transport/$(DEPDIR)/SocketTransport.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@ndn-cpp/c/util/$(DEPDIR)/DynamicUCharArray.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@ndn-cpp/c/util/$(DEPDIR)/ndn_memory.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@ndn-cpp/c/util/$(DEPDIR)/ndn_realloc.Po@am__quote@