Any railroad company incorporated by or under the laws of or operating lines of railroad within this state, and operating telegraph and telephone lines in connection therewith, upon filing its assent to this chapter in the office of the secretary of state, shall thereby become clothed with the rights, powers, and duties provided by this chapter for telegraph and telephone companies, so as to enable telegraph or telephone companies to be operated by it.